Forum Replies Created

Viewing 15 posts - 196 through 210 (of 455 total)

  • RE: Alias Usage

    paul.knibbs (6/17/2013)


    ... and third, I *always* use AS to specify column aliases because I find the alternative causes confusion....

    Agreed. I got this one right primarily because I've been bitten by...

  • RE: BETWEEN a hard place and a rock

    There is a bug in your answer. You say:

    This means that the first query returns all rows from MyTable, the second only the rows with NumericColumn equal to NULL....

  • RE: COALESCE

    Good question! I would clarify the answer a little bit, though:

    ... the result returns the data type of the expression with the highest data type precedence.

    should probably be

    ......

  • RE: TOP clause WITH TIES

    L' Eomot Inversé (5/30/2013)


    That's a fun question.

    But maybe there will be complaints from some who think QotD should test only knowledge and not reasoning (except perhaps very trivial...

  • RE: Distinct

    SQLRNNR (5/6/2013)


    What, no controversy for this question?

    Thanks Vinay

    Funny you should say that. I answered with a small degree of uncertainty, and read the discussion with greater trepidation, because I was...

  • RE: Delete v Truncate

    Hugo Kornelis (3/21/2013)


    ...

    DDL is language that describes data structures. Truncate table does not in any way change the schema of a table. It only removes all data from a table...

  • RE: Delete v Truncate

    paul s-306273 (3/21/2013)


    Two pints for this?

    Wow!

    You got two pints? All I got was points!

    I want my two pints!

  • RE: CASCADE - 1

    Stuart Davies (3/20/2013)


    Nice and clear question - thanks Ron

    Yes, but he did nothing to account for those of us who read through the question, came to the correct conclusion, and...

  • RE: DATETIME - 4

    I'm curious: What was the point of the cursor-like WHILE and incrementing the ID by 3? Just Obfuscation? Why didn't you just write the query as:

    SELECT ID AS 'Select number',...

  • RE: Temp Table Data Types

    I wasn't sure what the confusion was here. All of the values in the example SELECT...INTO are constants. When you create a constant, the format you express it in tells...

  • RE: An Orders of Magnitude Problem (T-SQL Tuning)

    Great article!

    This is definitely one of those instances where the journey is more valuable than the destination (for me, at least).

    The methodical testing of the issue and possible solutions...

  • RE: Merge

    Matt Marston (2/14/2013)


    As Tom said,

    the explanation would have been better if it had pointed out that filters like this can be placed in the when matche/not matched conditions.

    However, no...

  • RE: Basic Date Function

    Michael Riemer (2/13/2013)


    +1 to the above points.

    Great question as far as idea and content goes, but needs clarification as to where you are in the world!!

    Actually, no it doesn't.

    The only...

  • RE: Basic maths - operator precedence

    sipas (2/6/2013)


    sknox (2/6/2013)


    Always work left-to-right -- don't give precedence to an operation on the same level.

    For example, take

    8 / 4 x 2

    The correct way is left-to-right:

    8 / 4 = 2...

  • RE: Basic maths - operator precedence

    sipas (2/6/2013)


    BODMAS says:

    B Brackets first

    O Orders (i.e. Powers and Square Roots, etc.)

    DM Division and Multiplication (left-to-right)

    AS Addition and Subtraction (left-to-right)

    It actually doesn't matter whether you do...

Viewing 15 posts - 196 through 210 (of 455 total)