• roger.plowman (11/28/2011)


    Using single quotes for both strings and dates is a brain-dead design decision--period.

    Technically, T-SQL is not using single quotes for both strings and dates. It uses single quotes for strings only.

    There is no way to have date literals in T-SQL; that's why we have to make do with string literals that will be converted (at execution time) to date or datetime values.

    </pedantic>


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/