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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 query sales date + trx time
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

usafelix
Posting Yak Master

Hong Kong
165 Posts

Posted - 08/23/2014 :  14:04:38  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000