Forum Replies Created

Viewing 15 posts - 466 through 480 (of 819 total)

  • RE: SQL Server 2012 Concat

    Some formatting with CONCAT:

    SELECT

    concat

    (

    'Name: ',t.name

    ...

  • RE: SQL Server 2012 Concat

    select concat(null + 'Hello','testString') as a

    , null+'testString' as b

    It simply returns 'testString', NULL

    😀

  • RE: A simple trick for “Block Comment” syntax in SSMS

    Wonderfull!

    You gave me a good Idea.

    😀

  • RE: T-SQL Like

    Iggy-SQL (7/2/2013)


    To me, the explanation isn't quite right. I believe the right explanation should be something along this line:

    Statement 1 : The SQL Database Engine converted the Val value to...

  • RE: IFF - 1

    Hugo Kornelis (6/19/2013)


    L' Eomot Inversé (6/19/2013)


    After all, case-sensitive collations are an absolute pain for almost all purposes, so it might be a good idea to get people whose servers are...

  • RE: SQL CHOOSE

    matthew.flower (6/19/2013)


    It is all very well saying "re-run it with this additional line" when the returned error from the code in the question is exactly the wording of one of...

  • RE: SQL CHOOSE

    Richard Warr (6/19/2013)


    I ran the code and got:

    Msg 242, Level 16, State 3, Line 7

    The conversion of a varchar data type to a datetime data type resulted in an out-of-range...

  • RE: SQL CHOOSE

    If the statement begins with

    set dateformat ymd,

    the qotd would be perfect.

  • RE: Float Data Type

    Hugo Kornelis (6/8/2013)


    nenad-zivkovic (6/7/2013)


    From BOL http://msdn.microsoft.com/en-us/library/ms187912(SQL.100).aspx

    Avoid using float or real columns in WHERE clause search conditions, especially the = and <> operators.

    Should be "Avoid using float or real columns." Period....

  • RE: Float Data Type

    Instead of this syntax:

    SELECT I, N

    FROM @T

    WHERE N > 0.114

    AND N < 0.116

    I prefer this one:

    SELECT I, N

    FROM @T

    WHERE ABS(N - 0.115) < 0.0000001

    It's more...

  • RE: IFF - 1

    Primo Dang (6/6/2013)


    Seriously though, varchar(1) really doesn't make much sense to me, I guess char(1) would do the job perfectly and avoid the extra 2 byte overhead.

    I disagree with you:...

  • RE: IFF - 1

    palotaiarpad (6/6/2013)


    Collation, collation, collation....

    If not specified, the default collation always is CASE INSENSITIVE.

  • RE: Usage of Null

    Starting from SQL2000 SET ANSI_NULLS OFF is a real deprecated option.

    From BOL:

    In a future version of SQL Server, ANSI_NULLS will always be ON and any applications that explicitly set the...

  • RE: SSMS Error Message

    SQLRNNR (5/26/2013)


    Easy enough - I have done this in the past.

    +1

    In 80's, on mainfraim I placed the prompt with:

    "ADVANCED COBOL '85. COMPILING SOURCE ... SGCONT.CBL"

    So, it seemed an everending...

  • RE: Event Notification on Server

    It's easy, all services of microsoft store data in msdb (that stands for "microsoft database").

Viewing 15 posts - 466 through 480 (of 819 total)