Forum Replies Created

Viewing 7 posts - 76 through 82 (of 82 total)

  • RE: Varchars as IN params ??

    Non Dynamic option?:

    User Defined Function

    Create a UDF to take in a string list of ID parameters and cycle through them, adding them to a table variable before returning that table....

  • RE: random query

    Alternative:

    declare @a int

    declare @b-2 int

    set @a = (select Max(Col_Id) from Table)

    set @b-2 = (select cast(rand()*@a as int))

    select * from table where col_id=@b

    ...

  • RE: Cross-column calculations

    I have found that if you declare a table variable, and then try to use it in a dynamic piece of SQL later on, it will return a 'must declare...

  • RE: Cross-column calculations

    You may find you have a problem using table variables in dynamic sql. I did try this but found a temp table the only option. Table variables have several limitations,...

  • RE: Cross-column calculations

    -- Columns into Rows:

    -- Conditions:

    -- will need to read from Table with standard column headers

    -- Will need to specify which RowId to read

    -- Will need to specify number of columns

    --...

  • RE: Table Permissions required when SP is run

    Hi

    Thanks for the quick response.

    The SP does not contain Dynamic SQL.

    Following on from your comments, a bit more investigation revealed the issue, it was connected to Database ownership.

    The SP's are...

  • RE: Generate Column headers from Variables

    Thanks

    I had never heard of it, but it seemed like something that might have been possible, as you would have thought that having a variable column header name would not...

Viewing 7 posts - 76 through 82 (of 82 total)