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
  • 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Class object 2 28
Not showing JavaScript in the list 5 41
SSL https .net web site force redirect 3 38
Server Error 11 48
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
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.…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

863 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now