So hi there.
In my company we do a lot of reporting which needs a lot of filters and such to create dynamic queries.
This leads to us often needing to make chunks of T-SQL which may or may not have any restrictions, and its been practice here for a long time to get around this by using: -
WHERE 0=0
--insert restrictions after this
The reason? That way your always able to just plop your and/or on to the restriction without worrying if its actually the first thing to have been added and whether or not you need to put the and/or.
Long and short of the question - just how is this performance wise? Bad practice or generally accepted way of doing this?