|
 |
aspdotnet_website_programming thread: Displaying results of the stored procedure that uses cursors
Message #1 by alexo@c... on Tue, 20 Aug 2002 07:55:30
|
|
Hi everyone!
I have a fairly complex stored proc where I use cursors to get the
iteration going. The end result that I get looks something like this
repID unitsSold sold_in_24hours sold_in_48hours
---------- ----------- ---------------- --------------
CUST0001 1 0.00% 100.00%
repID unitsSold sold_in_24hours sold_in_48hours
---------- ----------- ---------------- -------------
CUST0002 15 80.00% 20.00%
repID unitsSold sold_in_24hours sold_in_48hours
---------- ----------- ---------------- ---------------
CUST0002 3 30.00% 70.00%
Basicaly I get 1 recordset for each unique repID.
My question is about dysplaying this using ASP.NET
How can I combine these recordsets in my code so that I get only 1 header
and the actual results as rows under it, ie:
repID unitsSold sold_in_24hours sold_in_48hours
---------- ----------- ---------------- --------------
CUST0001 1 0.00% 100.00%
CUST0002 15 80.00% 20.00%
CUST0002 3 30.00% 70.00%
Thanks you in advance.
Message #2 by "Charles Walsek" <cwalsek@e...> on Tue, 20 Aug 2002 06:26:18 -0400
|
|
How 'bout adding a bit more to the stored proc? Make a union of the three
cursors nso that your end result is 1 cursor. I think that's how ASP.NET
can best deal with the results
Message #3 by "Mike Gale" <info@d...> on Tue, 20 Aug 2002 22:33:07 +1200
|
|
Have you tried using UNION (or UNION ALL) in your stored procedure?
Alternatively if you get separate datasets into your ASP.NET code, you
can merge those using code into the first dataset (say).
One of the SQL server sites is likely to have an article on doing this
within a stored procedure.
Mike Gale, Decision Engineering (NZ) Ltd.
-----Original Message-----
From: alexo@c... [mailto:alexo@c...]
Sent: Tuesday, 20 August 2002 07:56
To: Website Programming with ASP.NET
Subject: [aspdotnet_website_programming] Displaying results of the
stored procedure that uses cursors
Hi everyone!
I have a fairly complex stored proc where I use cursors to get the
iteration going. The end result that I get looks something like this
repID unitsSold sold_in_24hours sold_in_48hours
---------- ----------- ---------------- --------------
CUST0001 1 0.00% 100.00%
repID unitsSold sold_in_24hours sold_in_48hours
---------- ----------- ---------------- -------------
CUST0002 15 80.00% 20.00%
repID unitsSold sold_in_24hours sold_in_48hours
---------- ----------- ---------------- ---------------
CUST0002 3 30.00% 70.00%
Basicaly I get 1 recordset for each unique repID.
My question is about dysplaying this using ASP.NET
How can I combine these recordsets in my code so that I get only 1
header
and the actual results as rows under it, ie:
repID unitsSold sold_in_24hours sold_in_48hours
---------- ----------- ---------------- --------------
CUST0001 1 0.00% 100.00%
CUST0002 15 80.00% 20.00%
CUST0002 3 30.00% 70.00%
Message #4 by "Armando G Zuniga" <a_zuniga@w...> on Tue, 20 Aug 2002 05:56:11 -0500
|
|
Alex,
Have you tried using the UNION statement in the SP?
Regards,
Armando G Zuniga
Unicomp Technologies Company
Sugar Land, TX
USA
-----Original Message-----
From: alexo@c... [mailto:alexo@c...]
Sent: Tuesday, August 20, 2002 7:56 AM
To: Website Programming with ASP.NET
Subject: [aspdotnet_website_programming] Displaying results of the
stored procedure that uses cursors
Hi everyone!
I have a fairly complex stored proc where I use cursors to get the
iteration going. The end result that I get looks something like this
repID unitsSold sold_in_24hours sold_in_48hours
---------- ----------- ---------------- --------------
CUST0001 1 0.00% 100.00%
repID unitsSold sold_in_24hours sold_in_48hours
---------- ----------- ---------------- -------------
CUST0002 15 80.00% 20.00%
repID unitsSold sold_in_24hours sold_in_48hours
---------- ----------- ---------------- ---------------
CUST0002 3 30.00% 70.00%
Basicaly I get 1 recordset for each unique repID.
My question is about dysplaying this using ASP.NET
How can I combine these recordsets in my code so that I get only 1 header
and the actual results as rows under it, ie:
repID unitsSold sold_in_24hours sold_in_48hours
---------- ----------- ---------------- --------------
CUST0001 1 0.00% 100.00%
CUST0002 15 80.00% 20.00%
CUST0002 3 30.00% 70.00%
Thanks you in advance.
|
|
 |