• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 253
  • Last Modified:

multiply result sets

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.
example
select invoice from table1

open cursor
exec sptable2
close cursor

open cursor
exec sptable3
close cursor

ect...
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.
0
Seven price
Asked:
Seven price
  • 3
  • 2
1 Solution
 
brad2575Commented:
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.
0
 
Seven priceFull StackAuthor Commented:
But a temp table I thought of but there are different headers for each table, some similar but not totally.
0
 
brad2575Commented:
You can create multiple temp tables then.
0
 
Seven priceFull StackAuthor Commented:
Ok if this is possible then I can take all the temp tables and make one pdf file, is that correct.
0
 
Seven priceFull StackAuthor Commented:
Sounds like something I can try. Thanks for the idea.
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now