Forum Replies Created

Viewing 15 posts - 601 through 615 (of 652 total)

  • RE: How many rows are returned from the query below?

    Lynn Pettis (3/3/2010)


    Second, it doesn't matter how many rows are in the table tblUsers (unless it only contained one row, but everyone so far has assumed more than one), this...

  • RE: How many rows are returned from the query below?

    Aam-624390 (3/3/2010)


    Seems to be a lot missing assumptions.

    Well it seems a reasonable assumption that tblUsers exists, and is a table.

    You then have to guess about data volumes -...

  • RE: FOR XML PATH

    GlenParker (2/19/2010)


    Not sure if it was a browser issue but couldn't copy the script to paste into Query Analyser, anyone else have that problem?

    It's an image rather than text, presumably...

  • RE: Bit by bit

    Marry Krissmess (2/5/2010)


    In programming languages this may be treated as boolean but here it should be a numeric range and any thing else than 0 or 1 should throw an...

  • RE: Query cost

    Jamie Longstreet-481950 (2/6/2010)


    it makes far more sense (to me) that an "exists" functionality will provide a faster and more efficient query than one searching the index for a value (IN...

  • RE: Multi-statement execution

    Interesting question, thanks 🙂

    I got it right, but largely down to guesswork - my initial thought was 0, but the name of the temp table "#funny_test" made me expected something,...

  • RE: Bit by bit

    Bob Cullen-434885 (1/28/2010)


    Ah! So a BOOLEAN type, then. That's different, and if so should also require that the language provides proper TRUE and FALSE keywords, rather than hijacking numeric values...

  • RE: Bit by bit

    Here's a slightly better reference

    http://msdn.microsoft.com/en-us/library/ms191530(SQL.90).aspx#_bit

    "Converting to bit promotes any nonzero value to 1"

  • RE: Bit by bit

    "if a number larger than one is used, it is converted to one."

    I thought the actual explanation was that anything other than 0 (false) is treated as true and hence...

  • RE: Query cost

    Hugo Kornelis (1/27/2010)


    the strangely popular but really rather odd EXISTS 1 instead of EXISTS * (EXISTS checks for rows, not values, so what you put there is immaterial - except...

  • RE: Query cost

    I recently optimised a query and tried exactly these two constructs. The query plan for both was identical.

    So the correct answer is either "they are equal", or (more likely I...

  • RE: Question of the Day for 21 Dec 2009

    "Due to the Holiday Season, and Frosty being a part of the season, an easy question was in order. "

    It might be easy if you're American. Who's Frosty the Snowman?!?

    :unsure:

  • RE: Temp Tables

    Steve Jones - Editor (12/17/2009)


    wow, you guys are really splitting hairs. A restart includes a shutdown and startup of the database instance. How could you argue it includes anything else?...

  • RE: Temp Tables

    BOL says "a global temporary table is dropped at the completion of the last Transact-SQL statement that was actively referencing the table when the creating session ended".

    I took this to...

  • RE: Fun with Decimals

    Correct answer, but the explanation is completely wrong!

Viewing 15 posts - 601 through 615 (of 652 total)