Forum Replies Created

Viewing 15 posts - 31 through 45 (of 93 total)

  • RE: DATALENGTH

    Interesting that this does not work the same way.

    select datalength(convert(varchar, getdate(), 101))

  • RE: Are we in all these cities?

    Thanks for the question. I learned something. I didn't know that Not ending Transact-SQL statements with a semicolon was on the Deprecated Database Engine Features in SQL Server 2008 R2.

    http://msdn.microsoft.com/en-us/library/ms143729.aspx

    Thanks,

    Kevin

  • RE: REPLACE() and NULL

    john.arnott (7/12/2010)The QOD not only calls our attention to this specific behavior in the REPLACE() function, but also to the general issue of understanding and programing to handle NULL.

    I see...

  • RE: REPLACE() and NULL

    KevinC. (7/12/2010)


    It makes sense.

    Really? Would it have been too difficult to return the string unmodified if there was a NULL detected? In the way it is now, a small bug...

  • RE: REPLACE() and NULL

    Anyone got any ideas why this function was made to work this way? Makes no sense to me.

  • RE: What will be the output of the following?

    Sorry if this was already covered. I did read through the 11 pages :doze: and didn't see much on the subject of sort order. Without a specified order wouldn't -3,...

  • RE: "SELECT @local_variable"

    Hugo Kornelis (6/25/2010) Is 0.1% chance of incorrect results acceptable for your user?

    Not for me.

    Hugo, is this the article you were looking for?

    "The correct behavior for an aggregate...

  • RE: Rowcount and multiple assignment

    Rune Bivrin (4/14/2010)


    It's important to note that SET @result = cast (@@rowcount as varchar) does NOT change @@ROWCOUNT. The first 1 comes from the last INSERT #n VALUES(3).

    This is one...

  • RE: NULL

    Thanks Hugo! Great explanation.

  • RE: Answers to Your QOD

    LOL I lost another point. 🙂

    I enjoy QOD and think it is a good learning tool. The idea of points makes it competitive and sometimes taken too seriously IMO.

  • RE: COUNT_BIG

    I believe that this is what the explanation should have been.

    The answers are: SELECT COUNT_BIG(ALL COlumn_2) and SELECT COUNT_BIG(column_2). COUNT_BIG(*) will count all rows from the table (including duplicate &...

  • RE: SQL Server Jobs

    I don't think I learned anything useful by getting this question wrong. Who cares if you can create a job in express if it can't be used?

  • RE: SQL 2008 T-SQL

    This is a new feature in SQL 2008

  • RE: SQL 2008 T-SQL

    john.moreno (8/25/2009)


    On my SQL 2008 server (using the Master database so no question of compatibility level) this fails with the previously mentioneed "GetBytes function" error.

    I found that the reason...

  • RE: SQL 2008 T-SQL

    bhavster27 (8/25/2009)


    DECLARE @i AS INT = 100,@msg AS VARCHAR(5)= '11',@Date AS DATE=GETDATE()

    will generate error "Cannot assign a default value to a local variable."

    Not for SQL 2008

Viewing 15 posts - 31 through 45 (of 93 total)