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 > How to make Informix Stored Procedure Able To Return Multiple Rows of Data

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-16-11, 03:59
johnsonlim026 johnsonlim026 is offline
Registered User
 
Join Date: Dec 2006
Posts: 15
How to make Informix Stored Procedure Able To Return Multiple Rows of Data

HI, i am a new bee in Informix Sql.
I have search online but no resource on how to return multiple rows of data from stored procedure.

For sql server 2005,
i just need to select whatever data i want to return...

but it is not same in Informix...
Does anyone has any idea on returning multiple rows of data from a stored procedure?
Help Please !!
Reply With Quote
  #2 (permalink)  
Old 03-16-11, 08:13
InformixWilli InformixWilli is offline
Registered User
 
Join Date: Sep 2010
Location: Germany, Brunswick
Posts: 52
Code:
create procedure test () returning int, char(50);
  define a int;
  define b char(15); 
  foreach c1 for
    select customer_num, lname into a,b from customer
    return a, b with resume;
  end foreach;
end procedure;

select a, b
from table(test())(a,b)
where a > 110;
Return values from an SPL function
__________________
WilhelmW
IBM Certified Database Associate

wilhelmw.de - www.isr.de
Reply With Quote
  #3 (permalink)  
Old 03-16-11, 22:59
johnsonlim026 johnsonlim026 is offline
Registered User
 
Join Date: Dec 2006
Posts: 15
Got It!!
Thanks InformixWilli !!
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