jeudi 29 janvier 2015

Need to query records based on Date only (Sample Query given)



sSQL = "
SELECT ordID, ordName, ordDate, ordShipping, ordStateTax,
ordHandling, ordTotal, ordDiscount, ordPrivateStatus
FROM orders
WHERE (ordStatus = 7)
"


I want to display orders that came in yesterday as a daily report script I am building


How would I go about it?


SQL Server 2005


ordDate has this format: 2015-01-28 14:58:49.000





Aucun commentaire:

Enregistrer un commentaire