• For those who propose alternative writtings to the sample code, you must consider that code is only a construction to verify the actual behavior of a query.

    The original code was something like:

    Select *

    From pubs.dbo.authors

    where

    au_lname >= 'M'

    -- Let's add a filter by state, and what woud you think it doesn't work at all?

    and state = 'CA'If you execute this code, not dynamic, not complex, and the result set does contain authors from other states than California, maybe you get confused as I did.

    And the reason is the CRLF behind the question mark was not there; in the hex editor there was only the LF character.

    As Nakul Vachhrajani's post suggests, I'd like to remark that in SQL Server, unlike other programming languages, the organization of the code is generally irrelevant - but there is at least an exception: the line comment, and the (buggy) behavior I expose is a direct consequence of this exception.