Forum Replies Created

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

  • 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").

  • RE: Data Type

    I use this command SELECT INTO to create a table in development environment, then

    I use my personal EXEC sp_createtable 'TempTab' to generate the script for creating the table

    and in the...

  • RE: Timestamps

    The question states the batch in the very begining, there are no batch separators, and answers contain "not run due to previous errors". I think it's enough.

    +1

    😀

    Good qotd, but too...

  • RE: Identity Insert

    Danny Ocean (5/2/2013)


    Most of people don't know about it because it's not in use in any real scenario. I never use this kind of table in production environment, But i...

  • RE: Table Alias

    Rune Bivrin (5/2/2013)


    Hugo Kornelis (5/2/2013)


    However, to do some nitpicking:

    1. If I were to try this code on my system, I would get five errors. All system table (*) names are...

  • RE: Table Alias

    I like explanation!

    😀

  • RE: REPLICATE - 1

    crussell-931424 (5/1/2013)


    Hugo Kornelis (5/1/2013)


    Raghavendra Mudugal (5/1/2013)


    sorry; I have hard time in understanding/realizing the missing piece here.

    - Replicate is replicating as needed (the expression is 5 chars and and

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