Groups | Blog | Home
all groups > sql server new users > march 2006 >

sql server new users : filtering based on date


r
3/16/2006 4:57:53 PM
I have a query/view in which I want to omit anyone whose signup date is ON
or AFTER 1/1/2005. The field is formatted as smalldatetime. How do I write
that in a WHERE statement?!


r
3/16/2006 5:46:22 PM
Ah, forgot the ' ' ... thanks!

[quoted text, click to view]

Tom Moreau
3/16/2006 8:03:21 PM
Try:

select
*
from
MyTable
where
SignUp >= '20050101'

--
Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
..
[quoted text, click to view]
I have a query/view in which I want to omit anyone whose signup date is ON
or AFTER 1/1/2005. The field is formatted as smalldatetime. How do I write
that in a WHERE statement?!


AddThis Social Bookmark Button