Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

multiply result sets

Posted on 2012-03-15
5
Medium Priority
?
250 Views
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.
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
Comment
Question by:Seven price
[X]
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
5 Comments
 
LVL 16

Expert Comment

by:brad2575
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.
0
 
LVL 9

Author Comment

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

Accepted Solution

by:
brad2575 earned 2000 total points
ID: 37737165
You can create multiple temp tables then.
0
 
LVL 9

Author Comment

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

Author Closing Comment

by:Seven price
ID: 37738354
Sounds like something I can try. Thanks for the idea.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

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 …
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
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. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

715 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