multiply result sets

Posted on 2012-03-15
Last Modified: 2012-03-19
I am looking for the best solution  to my dilemma .
I have a stored procedure using a cursor that give me results from passing an invoice number to give me different tables with different information resulting from the one invoice number.
select invoice from table1

open cursor
exec sptable2
close cursor

open cursor
exec sptable3
close cursor

But now I need to show the results but cannot bind it to a dataset for a crystal report because I only see the first select. any tool modules or suggestions would be great.
Question by:sevensnake77
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 16

Expert Comment

ID: 37726363
You can use an output paramater on your SP to output 2 table variables.

Or even better yet generate a temp table (or even permenant table) in the SP and read from it inside the report.

Author Comment

ID: 37726665
But a temp table I thought of but there are different headers for each table, some similar but not totally.
LVL 16

Accepted Solution

brad2575 earned 500 total points
ID: 37737165
You can create multiple temp tables then.

Author Comment

ID: 37737758
Ok if this is possible then I can take all the temp tables and make one pdf file, is that correct.

Author Closing Comment

ID: 37738354
Sounds like something I can try. Thanks for the idea.

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Trouble installing msi file with msiexe.exe 2 51, radiobuttonlist, c# 3 69
history of pages 7 54
Textbox autocomplete using jquery in 13 50
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question