I have a questions related to SQL (teradata in particular).
I have to generate the report for 1 day.
How can I achieve it?
For example, in ms access, I can do
WHERE DT>=#2011-01-01# and DT<=#2011-0101#
What about big-guys? (SQL Server, not MS Access).
I know that it is possible to use
DT between '2011-09-01' and '2011-09-02'
But this method is not precise. How can I specify 1 day using ranged WHERE statement?
I apologize, I don’t have the SQL access and I can’t test it; therefore I am asking for professional advise.
BETWEENis range-inclusive, so this will do:And, yes, it is precise 🙂
Now, if your
DTis a datetime field (not date field), then you must change your approach: