Forum Replies Created

Viewing 15 posts - 526 through 540 (of 819 total)

  • RE: TSQL 2012 #1

    Koen Verbeeck (12/27/2012)


    Nice question about a new feature, but your explanation could have mentioned the FOR BROWSE option. After all, that's what the question is about 🙂

    +1

  • RE: Divide by zero

    Toreador (12/24/2012)


    That required rather more brain cells than I was expecting to need on Christmas Eve :hehe:

    Glad to see that option 5 really should be correct, I'd started to think...

  • RE: Aggregates in T-SQL

    Koen Verbeeck (12/20/2012)


    Easy question. I didn't even had to check to 3rd query, because the second one gave (NULL,0) and there was only one answer in the list with that...

  • RE: Renaming a procedure

    Hugo Kornelis (12/12/2012)


    As happens more often with a Question of the Day: Good idea, but badly executed.

    If you exactly follow the instructions, executing the 'alter proc' script after making the...

  • RE: SQL

    OK, I get it wrong, but I understood that the author does not know the "ON CASCADE" options.

  • RE: Queries

    The profiler shows Read 0

    This is the most wrong and useless qotd in the history of ssc.

  • RE: Datetime Default

    Easy question, but answer really wrong!

    The DEFAULT is used only if no value is specified for the column or DEFAULT VALUES keyword.

    -- default is triggered

    create table #b (a datetime default...

  • RE: File Tables

    demonfox (11/19/2012)


    After reading the file table, I fell on varbinary(max) ..

    need to read it again ..

    thanks for the question..

    +1 🙁

  • RE: Rounding question

    I think it depends on "inaccuracy in the floating point represtentation" as said Hugo.

    STR convert any number to float.

    Here the script to force the right round (a double cast to...

  • RE: Usage of @@ERROR in Transaction

    Stewart "Arturius" Campbell (11/16/2012)


    Good question, thanks

    Another motivation to use TRY CATCH...

    +1

  • RE: Usage of @@ERROR in Transaction

    Best practise: save @@error and @@rowcount to test them later

    declare @err int

    ,@rows int

    select 1

    SELECT @err = @@error, @rows = @@rowcount

    if @err <> 0 or @rows = 0

    ...

  • RE: Transactions in T-SQL

    tteelucksingh (11/13/2012)


    Got it wrong though, missed the first select..into statement before the while loop.

    I missed the last!

  • RE: Lead - 2

    This is a PERFECT qotd!!!

    You can't miss it!

    :-D:-D:-D

  • RE: Nanoseconds

    Boh!!!!!

    I do not understand what the question is about, so, how can I answer correctly?

    The method 2 is incomplete or bad written.

    😎

    I do not like qotd too long.

  • RE: SUM and Addition of Null

    Remember that SUM may return NULL, so SUM(num1)+SUM(num2) may lead to NULL:

    select

    sum(num1) AS S1,

    sum(num2) AS S2,

    sum(num1) + sum(num2) AS S3,

    sum(num1 + num2) AS S4

    from

    ...

Viewing 15 posts - 526 through 540 (of 819 total)