Forum Replies Created

Viewing 15 posts - 16 through 30 (of 521 total)

  • RE: T-SQL Like

    L' Eomot Inversé (7/3/2013)


    [...]as in the first statement where both arguments of LIKE are required to have a string type[...]

    Hi,

    they are not required to be a string type. But...

  • RE: How does SQL pronounce SQL?

    Love the question 🙂 Didn't know I was working with a sick whale:

    SELECT DIFFERENCE('Sql','sickwhale')

    😀

  • RE: Temp Tables revisited

    Hugo Kornelis (6/24/2013)


    [...]Thanks for putting me straight! 😉

    Wow, give me a minute - I need to put this into a pricture frame for my living room (or my next résumé);-)

  • RE: Temp Tables revisited

    Hugo Kornelis (6/24/2013)


    Christian Buettner-167247 (6/24/2013)


    Why was this question reposted with the same misleading explanation as the original QOTD a month ago?

    If you are refering to the mistake in the last...

  • RE: Temp Tables revisited

    Why was this question reposted with the same misleading explanation as the original QOTD a month ago?

  • RE: Date add with Different DataType

    Richard Warr (6/21/2013)


    Another one where the answer only holds if you have YMD Date Format. Most non-US users will get Error, Error here.

    However, it's obvious that the second error is...

  • RE: Date add with Different DataType

    Thanks for the question. Please note though that the 2nd query will also fail on some systems with other language settings.

    SET DATEFORMAT DMY

    GO

    --Query 2

    DECLARE @dt1 DATETIME

    SET @dt1 = '2013-05-30'

    SELECT...

  • RE: Temp Tables

    Good question, but the answer is wrong.

    SQL Server evaluates object references during parse time. Flow-control logic is not applied at this stage.

    This is not true. If you change the temporary...

  • RE: Assigning categories to values 2

    I was also looking for the trick:)

    Regarding the aggregates & case evaluation:

    the CASE evaluation order is guaranteed for the SELECT phase. I think it helps to understand it when...

  • RE: FK to IDENTITY

    Great question. And specifying the IDENTITY_INSERT setting for the table was definitively a good idea. Be explicit.

  • RE: Handling NULL

    Be careful with omitting information in your SQL.

    For example, it is good practice to explicitly specify the nullability of your columns.

    Had ANSI_NULL_DFLT_OFF for the session, the insert would fail.

    Msg 515,...

  • RE: Triggers 1

    Hi,

    There is one subtle issue with the explanation (and also the MS documentation).

    It is not the ROLLBACK that is causing the abort of the batch. Instead, the batch is...

  • RE: ISNUMERIC

    As far as I understand, IsNumeric works roughly like this:

    CASE WHEN COALESCE(

    TRY_CAST(@input AS numeric)

    ,TRY_CAST(@input AS bigint)

    ,TRY_CAST(@input AS money)

    ,TRY_CAST(@input AS smallint)

    ,TRY_CAST(@input AS smallmoney)

    ,TRY_CAST(@input AS...

  • RE: TRY...CATCH

    Von Microsoft am 29.12.2009 um 12:11 bereitgestellt

    I am resolving the corresonding SQL11 bug as "by design". Here is the explanation: The semicolon between END TRY and BEGIN CATCH should not...

  • RE: Clustered Index

    This was the easiest question I have seen in a while!

    Why you ask?

    Well demonfox gave a nice hint :-):

    Note : All queries execute without error, please ignore syntax...

Viewing 15 posts - 16 through 30 (of 521 total)