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

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -

delphi - How to convert bitmaps to video? -