• artisticcheese (5/20/2015)


    Grant Fritchey (5/20/2015)


    Not that I'm aware of. If I try to use code in that fashion it generates an error. You could substitute a local variable or hard code a value, but you're not going to be able to fundamentally alter the way the T-SQL language is interpreted. Sorry.

    Well this code worked in Access via ADO and it worked so I assumed there were some sort of compatibility setting which will allow SQL to ignore lack of quotes

    Or, the Access code was changed into something else when it was sent to T-SQL through the linked server or whatever. In straight T-SQL, that generates an error. If you look at the reserve keywords, TRUE and FALSE are not. They're future reserve words and they're part of the ODBC set of words, not T-SQL. I think you're right, there was an interpretation, but I suspect it was from the Access end, not the SQL Server side of things. The functionality you're attempting to replication is for a boolean. SQL Server doesn't have a boolean data type. Again, sorry.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning