A column name rcvdate, which is having datetime type, the value is like this:
2009-10-20 10:00:00
I want to do a select, my query:
SELECT *
FROM data
WHERE rcvdate = '2009-10-20'
Not working, I am expecting runnable query as I checked lots of query but they did’t worked.
Check against an interval if you want all rows for one day:
From SQL Server 2008 you can use this instead:
Cast to date is sargable but is it a good idea?