If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Multi resultset

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-10-09, 10:37
fmalmeida fmalmeida is offline
Registered User
 
Join Date: Jul 2009
Posts: 12
Multi resultset

Hi...

Does anybody know how can i return several resultset?

I have several temporary tables, and I want return those all as resultset. I can do it for a single table, but how to do it with several tables?

Thanks in advance.
Reply With Quote
  #2 (permalink)  
Old 08-10-09, 11:11
bigcalm bigcalm is offline
Registered User
 
Join Date: Jul 2009
Posts: 37
Not entirely sure what you want to do here - I assume you want a single result set with all the tables in? This is only possible if you're tables have the same column types...

select stuff, stuff2, stuff3
from temptable1
union all
select stuff4, stuff5, stuff6
from temptable2
union all
select stuff7, stuff8, stuff9
from temptable3
order by 3

(I have a feeling this isn't what you're after though. if it's not, you have to have separate selects and separate result sets for each).
Reply With Quote
  #3 (permalink)  
Old 08-10-09, 11:24
fmalmeida fmalmeida is offline
Registered User
 
Join Date: Jul 2009
Posts: 12
Yes, I want to return separate result set. How can I do that?
Reply With Quote
  #4 (permalink)  
Old 08-13-09, 03:42
bigcalm bigcalm is offline
Registered User
 
Join Date: Jul 2009
Posts: 37
Your language will vary, of course, but the general way would be...

Connection.Connect();

Recordset1 = Connection.getResultSet(" select * from customers ");

Recordset2 = Connection.getResultSet(" select * from bank_details ");

Recordset3 = Connection.getResultSet(" select * from orders ");

...etc...
Reply With Quote
  #5 (permalink)  
Old 08-13-09, 04:52
fmalmeida fmalmeida is offline
Registered User
 
Join Date: Jul 2009
Posts: 12
Hi...

I can't do it that way. Thanks anyaway.

Best Regards,

Fernando Almeida.
Reply With Quote
  #6 (permalink)  
Old 08-13-09, 08:46
ceinma ceinma is offline
Registered User
 
Join Date: Apr 2007
Location: Jundiai / SP - Brasil
Posts: 311
please, be more clear! give more details!
What language are you using?
what version of IDS?
What the difficult to fetch a SELECT? this is a basic thing for any application that access a database....
__________________
________________________________________
César Inacio Martins
Jundiai / SP - Brasil
http://www.imartins.com.br/informix - em Português
http://www.imartins.com.br/informix - English (translated by Google).
________________________________________
Reply With Quote
  #7 (permalink)  
Old 08-13-09, 09:10
fmalmeida fmalmeida is offline
Registered User
 
Join Date: Jul 2009
Posts: 12
Hi ceinma...

The IDS version is 11.50 FC1. I'm doing stored procedures, and I was trying to return several different result set, but it's not possible to do it with informix IDS. That is a feature it simply doesn't have.

I need to reach it using another approach.
Thanks.

Best Regards,
Fernando Almeida.
Reply With Quote
  #8 (permalink)  
Old 08-13-09, 09:36
ceinma ceinma is offline
Registered User
 
Join Date: Apr 2007
Location: Jundiai / SP - Brasil
Posts: 311
I don't have much time to help with details now , try work with WITH RESUME: WITH RESUME Keyword
Plus the TABLE operator...

Look this page : Utilizar uma stored procedure em um select no lugar de uma tabela | IMartins
Is in Portuguese , but the Informix code are the same...
__________________
________________________________________
César Inacio Martins
Jundiai / SP - Brasil
http://www.imartins.com.br/informix - em Português
http://www.imartins.com.br/informix - English (translated by Google).
________________________________________
Reply With Quote
  #9 (permalink)  
Old 08-13-09, 09:39
ceinma ceinma is offline
Registered User
 
Join Date: Apr 2007
Location: Jundiai / SP - Brasil
Posts: 311
__________________
________________________________________
César Inacio Martins
Jundiai / SP - Brasil
http://www.imartins.com.br/informix - em Português
http://www.imartins.com.br/informix - English (translated by Google).
________________________________________
Reply With Quote
  #10 (permalink)  
Old 08-13-09, 09:58
fmalmeida fmalmeida is offline
Registered User
 
Join Date: Jul 2009
Posts: 12
César, I'm portuguese, hence there are no problem.
I know work with the keyword WITH RESUME.
Anyway, that can't help me. However TABLE it's a nice funcionality.

Thanks

Valeu cara.

Fernando Almeida.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On