Forum Replies Created

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

  • 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

    ...

  • RE: Partitioned index

    L' Eomot InversΓ© (11/2/2012)


    Nice straightforward question.

    Surprised it's 3 points, though; it's rather easy.

    ++1 πŸ˜€

  • RE: LEAD - 1

    vk-kirov (10/30/2012)


    Thanks for question about the new feature of MSSQL 2012!

    ++1

    πŸ˜€

  • RE: Parsing values in the WHERE clause

    I get it right, but the explanation is completely wrong. The syntax for IN clause is or specify a subquery or a list of EXPRESSIONS. ONE expression can have multiple...

  • RE: Inner Join

    If all the rows get matched then the query will act as a cross join.

    I think the explanation is incomplete and inaccurate.

    INNER JOIN returns number of rows from left table...

  • RE: Tracking Processes

    I get it right, but

    rVadim (9/20/2012)


    DiskIO in sp_Who2 means reads and writes combined, not just reads as question asks.

    +1

  • RE: Backups

    You need add the clause "FORMAT" to succeed the second statement!

    BACKUP DATABASE TestDatabase_1

    TO DISK = 'C:\TestDatabaseBackup.BAK'

    WITH COMPRESSION

    GO

    BACKUP DATABASE TestDatabase_2

    TO DISK = 'C:\TestDatabaseBackup.BAK'

    ...

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