Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 query sales date + trx time

Author  Topic 

usafelix
Posting Yak Master

165 Posts

Posted - 2014-08-23 : 14:04:38
Anyone help to Output from the SELECT statement looks like this:
The time range from 8:00 am to 23:00 pm.
default input search sales start date , end date.
-----------------------------------------------------------------


Search date : (20141101) start date to (20141230)end date

shop Order Date Trx Time sku OrderAmt qty Sub Total Grand Total
---- ---------- ---------- --- -------- ---- ----- --- --------
A1 20141101 12:00-13:00 sku1 10.00 1
A2 20141101 13:00-14:00 sku2 0.00 2
B3 20141101 14:00-15:00 sku3 1.25 3 11.25
Total : 6 pcs

B4 20141230 12:00-13:00 sku4 100.00 20
C5 20141230 13:00-14:00 sku5 10.00 30
C6 20131230 14:00-15:00 sku6 0.00 60 110.00 121.25
Total :110 pcs


end
   

- Advertisement -