• roger.plowman (11/28/2011)


    You know, the fact this was a trick question highlights a glaring flaw in T/SQL (or perhaps SQL in general?). Using single quotes for both strings and dates is a brain-dead design decision--period.

    Would it be so hard to introduce a new quote character for dates, ala Access?

    For example:

    #02/21/2008# or #12/31/1899 14:23#

    Ambiguity is a nasty design flaw, SQL Server (or SQL in general?) is far enough down the road this should have been fixed by now...

    That's a good suggestion. It would get rid of some nasty accidental implicit conversion bugs.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP