• Thanks for the great article!

    I just want to make one small comment. I ran the code below:

    [font="Courier New"]SELECT OrderAmt,

    IIF(OrderAmt > 200,

    'High $ Order',

    'Low $ Order') AS OrderType

    FROM MyOrder;[/font]

    and got this error:

    [font="Courier New"]Msg 102, Level 15, State 1, Line 2

    Incorrect syntax near '>'.

    [/font]

    When I Googled the error, it turns out IIF() is not implemented in SQL 2008. I didn't see that noted in the article so it would be helpful to add a note about that at the start of the piece.

    But again, this is a fantastic tutorial! Thanks again!

    - webrunner

    -------------------
    A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
    Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html