Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Use returned data inside procedure
Message
From
22/09/2015 10:18:38
 
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2014
Application:
Web
Miscellaneous
Thread ID:
01624886
Message ID:
01624917
Views:
31
>>Both need totals, no matter if it is weekly. My week is based on Sunday first day. I use datepart(wk, date), it use client's machine?

>OK, sorry for being a bit dense, but I want to make sure I understand what results are needed.

>Let's say the first result set has counts summarized for every day in September. So the first result set would have 30 rows.

>Would the 2nd result set look like this?
WeekEnding             #Quotes    #column2     #column3         #column4
9/5/2015               100           200               300              400
9/12/2015             200           300               400              500
9/19/2015             300           400               500              600
9/26/2015             400           500               600              700
10/3/2015             500           600               700              800
NULL                    1500         2000            2500             3000
>Is that would you want the 2nd result to look like? One row per week, plus a grand total?

Absolutely, it's right.
John Harold Belalcázar Lozano
Associate Director Of Development
http://www.belvicto.co/
jhbelalc@gmail.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform