Forum Replies Created

Viewing 15 posts - 436 through 450 (of 821 total)

  • RE: Declare Variable

    In the following batch @j-2 is declared once, but initialized at every loop:

    declare @i int

    set @i = 2

    while @i < 10

    begin

    declare @j-2 int...

  • RE: Declare Variable

    Koen Verbeeck (9/15/2013)


    The question itself is great, however the explanation is lacking.

    There's no reference, and the explanation itself is incorrect.

    There's no variable that is "reset".

    The DECLARE is not ignored, it...

  • RE: Datefirst

    The scope of "set language" and "set datefirst" is per session and also per procedure/function

    Try this:

    create procedure proc_datefirst

    as

    set language 'us_english'

    select @@DATEFIRST

    go

    set language 'Italian'

    exec proc_datefirst

    select @@DATEFIRST

  • RE: Datefirst

    Clear and easy question!

    Thanks:-)

  • RE: Alter Certificate

    Thanks!

    Clear qotd!

    😛

  • RE: Alter Certificate

    Thanks!

    😛

  • RE: wildcards

    A version of the query without the use of local table:

    SELECT *

    FROM (

    VALUES ('Steve')

    , ('Stephan')

    , ('Stephanie')

    ...

  • RE: wildcards

    The correct exceution of the query depends on ansi_warnings

    set ansi_warnings off

    DECLARE @i TABLE( mychar VARCHAR(10));

    INSERT @i VALUES ('Steve'), ('Stephan'), ('Stephanie')

    ...

  • RE: Behavior of trigger

    Unusual altering a disabled trigger, but it's good to know!

    😉

  • RE: CASE vagaries

    Maybe, the author exchanged the CAST and the ISNULL:

    The right version:

    DECLARE @x CHAR(1)

    SET @x = CASE

    WHEN @x = 'x'...

  • RE: Garbage Collection

    Thanks for the question!

    🙂

  • RE: ACID Properties Question

    Fantastic!

  • RE: Holiday Breaks

    The usual SEVEN!

  • RE: Global Configuration Settings

    Here is sp_configure with a simple optimization:

    -- Use @configname and try to find the right option.

    -- If there isn't just one, print appropriate diagnostics and return.

    select @configcount = count(*)

    ...

  • RE: Global Configuration Settings

    Here is the code from sp_configure:

    -- Use @configname and try to find the right option.

    -- If there isn't just one, print appropriate diagnostics and return.

    select @configcount = count(*)

    from sys.configurations

    where...

Viewing 15 posts - 436 through 450 (of 821 total)