How do I return data that is ordered today in C# or SQL Server? -
i have table in sql server database called orderdetail
stores order data. have column in table called orderdate
stores date , time information orders.
i want retrieve orders orderdetail
table created today.
my scenario want make button click admin @ night see how many orders done today?
any regard appreciated.
try this:
select a.orderid, ... orderdetail 'a' inner join orderdate 'b' on a.orderid = b.orderid b.dateoforder between '5/20/2011 00:00:00' , '5/20/2011 23:59:59'
i assumed have id
in orderdetail
, id
same in orderdate
table.
Comments
Post a Comment