Press "Enter" to skip to content

Query Parsing Bug in SQL Server

Mark Wilkinson snuck up on a bug and caught it:

So now on to the good stuff, why you are all here. Where I work, we add comments to the top of all of our procedures (above theĀ CREATE) to add notes about changes that were made. Recently we had a procedure that compiled fine, but would not execute. It reported a syntax error, which is odd since it compiled fine:

Read on for the bug, which is a weird one.