I want to select multiple records on the basis of a matching year, for example in table tab
where columns are [id] int, [name] varchar, [boo
yyyymmdd pattern for SQL Server (not yyyy-mm-dd, it is unsafe generally)So, to find values between "12 Dec 2004" and "31 Dec 2009" inclusive, allowing for time:
...
where [IssueDate] >= '20041212' AND [IssueDate] < '20100101'
Edit, or this, because of the ambiguity in the question for "year = 2009"
...
where [IssueDate] >= '20090101' AND [IssueDate] < '20100101'