Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create a read/write empty cursor.
Message
 
 
To
05/07/2004 17:41:04
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
00920802
Message ID:
00922829
Views:
20
Hi Luis,

Basicly you'll have to create running total on the total sales on the list of cutomers ordered by the total sales in descendibg oreder. That you can use that totals to cut the records after 80% is reached.

>I solved that part, it was easier than I thought. In fact, I didn't have to create a cursor. I even did the same thing for other purposes. Well, the fact is that I need to create a Crystal report that shows me the, for example, 80% of customers that make my monthly sales. I already have a SELECT that gets me the customers, the total sales for that month, and the % that that customers is. In other words, percentage is not based on number of customers but on number of customers that make that 80%. Since this was more or less complex I created a stored procedure so that it returns a cursor for Crystal Reports.
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform