Forum Replies Created

Viewing 15 posts - 2,296 through 2,310 (of 3,348 total)

  • RE: Using SP_

    Christian Buettner-167247 (12/14/2011)


    Koen Verbeeck (12/14/2011)


    Great question!

    I have a question:

    why doesn't the second 'drop table' statement drop the table in the master database?

    Won't the statement look for the table in the...

  • RE: Using SP_

    An interesting find, Ron.

    What's even more interesting is that you get data from the table in master even if the current database has a different table with the same name....

  • RE: Sorting triggered by data type

    Cadavre (12/13/2011)


    I got the points because I made the correct assumption, but I think that if the data is consistent in representing an INT in "Value" where ever "IsInsuranceLength" =...

  • RE: Sorting triggered by data type

    A nice question, but a completely incorrect explanation!

    The problem is not that each possibility is evaluated for each line. That's easy to check, just run:

    SELECT CASE WHEN i <> 0...

  • RE: Variant Order 3

    Christian Buettner-167247 (12/12/2011)


    Maybe I have missed it, but is there any plausible reason to order by a SQL_VARIANT column, given the unintuitive sorting semantics? What problem can I solve with...

  • RE: Maximum number of Databases.

    Revenant (12/8/2011)


    I am getting

    Msg 102, Level 15, State 1, Line 1

    Incorrect syntax near 'GO'.

    on all 32,767 lines

    That's because GO is not a T-SQL keyword, but a batch seperator, recognised and...

  • RE: DATETIME 1

    Jason Selburg (12/7/2011)


    Allthough the intention of the question is valid and I got it correct, the SQL itself is not.

    With the question being "What values are returned"

    The correct answer...

  • RE: Variant Order 2

    L' Eomot Inversé (12/7/2011)


    What got me thinking of doing questions on variant order was a comment by someone (I think it was by Hugo in response to an earlier question,...

  • RE: DATETIME 1

    <sigh>

    When will people finally learn that the US date format is NOT universal??

    For a large majority of the world, the correct answer is 53, 31, 1, 32.

  • RE: Complex joins

    L' Eomot Inversé (12/6/2011)


    Just one question on that: if I write it using a CTE which contains a join, does that count as a nested join?

    I don't think there's a...

  • RE: Complex joins

    SQL Kiwi (12/6/2011)


    Hmm - but doesn't the CTE/derived table example break that assertion?

    It does. I only realised the CTE possibility later, after I already posted that earlier post.

    (For some reason...

  • RE: Complex joins

    Tao Klerks (12/6/2011)


    Any objection to my adding it to my test suite (which is also the demo list on poorsql.com) once I've fixed it?

    No problem for me!

    Sorry for breaking your...

  • RE: Complex joins

    ronmoses (12/6/2011)


    Would this not work as well?

    Yup! (As you already found out after posting).

    The only thing I don't like about your query is the semicolon before WITH. Semicolons belong at...

  • RE: Complex joins

    honza.mf (12/6/2011)


    Probably I will use right joins and nested joins only in case of self-defense. I prefer the readability and I think from left to right.

    Absolutely true. This question was...

  • RE: Complex joins

    SQL Kiwi (12/6/2011)


    Small point: in the explanation you say, "the only way to rewrite the query is to reverse the table order", but this code expresses the same SQL semantic...

Viewing 15 posts - 2,296 through 2,310 (of 3,348 total)