Forum Replies Created

Viewing 15 posts - 91 through 105 (of 335 total)

  • RE: Dynamic Queries - Can this be done

    he forgot the embedded quotes necessary around the converted date

  • RE: On storing PDF files in MS SQL Server

    well, you might want to reiterate some detail...

    first and formost: WHY?

    why are you storing them in SQL Server?

    What are you going to do with them?

    How might they be accessed/used/collected...

    Why...

  • RE: Error 17:SQL server does not exist or access denied

    Probably the method of logging in while making the connection: under the security tab for the linked server, how/who you're making the connection as.

    Other possibility, the name is not understood. ...

  • RE: Error 7405 when trying to save a stored proc

    Set the options inside your proc:

    create proc abc

    as

    SET ANSI_NULLS OFF  ---or on

    SET ANSI_WARNINGS OFF --or on

    ...

    or

    figure out what about that internal query is requiring those options and be...

  • RE: Lowest cost in a record

    do a simple case, it's wordy but it works

    update table

       set col = CASE WHEN A< B AND A< C AND A< D AND A < E THEN A

                      WHEN...

  • RE: Who Needs a Cadillac?

    I didn't read it, but I could venture a guess that any team requiring more than two pizzas to feed for any given meal is too large.  That sounds about...

  • RE: sp_OAMethod example

    And did you look up sp_OACreate in BOL?

    as far as I recall OACreate must be called to instantiate the object, just as any constructor process is required in OO.  Only...

  • RE: Getting column headers

    That's part of the native client interface layer (what used to be called dblib).  If you were programming in C directly to it you can get them.  I was also...

  • RE: using datetime variable in dynamic sql

    in dynamic SQL you are building a string so you need to treat it that way as you would in QA:

    What you're trying to create is   SELECT '10/27/2005'

    So

    SET @query_string...

  • RE: optimization x crash query

    If you're not going to need to filter the results of the function, I would apply it in an outer step.

    That is: do your primary select statement in an embedded...

  • RE: BCP/Bulk Insert and Incoming Dates

    When I'm loading data from other sources (i.e. data not exported from SQL Server), I do not rely on data types.  I BCP into char/varchar fields in a staging table...

  • RE: Suggestion for Query

    select username

          ,SUM( CASE WHEN state = 'TX' THEN 1 ELSE 0 END) as TX_count

          ,SUM( CASE WHEN state = 'OK' THEN 1 ELSE 0 END) as OK_count

          ,you get the idea

    FROM...

    GROUP...

  • RE: Brain Dead

    create outerprocname....

    declare @err int

    exec sp_lowerproc @varnameinlowerproc = @err OUTPUT

     

    OR

    exec @err = sp_lowerproc ...

    if the lowerproc does a RETURN @localerrvariable at end

    But that proc would have to capture @@error at every...

  • RE: Brain Dead

    exec lowersp @lowerspvarname = @localvarname OUTPUT

    but I tend to use the RETURN value for passing errors

    EXEC @localerrvar = lowersp @parm1=...

     

  • RE: Single Insert instead of Cursor

    Yet another clear case of the one user's trouble with the sp_domyjob system procedure.

    Looks like you want to add a row from another table if there's no row where cola=colb

    Do an...

Viewing 15 posts - 91 through 105 (of 335 total)