Re: Stored Procedure returning multible values in a SQL statement.
Posted in 1996
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL, Jobs, Consulting & Announcements
Your Name (actually Konrad Smuts who forgot to setup his name & address) wrote: > > Is it possible to use a stored procedure that returns more than one value > in an SQL statement? And if it is, how does the syntax look? When you say: RETURN variable; it sends a single value, when you say: RETURN variable WITH RESUME; it sends as many itterations of variable as you want. Obviously the RETURN needs to be in a loop. Also this must be called from within a FOREACH loop in a stored procedure, and a FETCH or FOREACH loop in 4GL. Hope that helps, -- Mark. +-------------------------------------------------------------------------+ |Mark D. Stock - The West Solutions Group http://www.west.co.za | | | |mailto:marks@west.co.za +------------------------------------------------+ |Tel: +27 11 803 2151 |If it doesn't work... force it! | |Fax: +27 11 803 2189 |If it breaks... it needed replacing anyway! | |Cell: +27 83 250 2325 |Well, that's how I code anyway! | +------------------------+------------------------------------------------+