Re: Stored Procedure returning multible values in a SQL statement.
Posted in 1996
} From: Kai Pruente <pruente@quantum.de> } } I suppose you have problems with your newsreader: } "Your Name <Yourname@somwhere.COM>" } > } > 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? } > } > Konrad Smuts } > email: smutsk@sentech.co.za } I could not try it by myself but try the following: } create procedure my_proc( param1 integer ) } RETURNING char(8), DATETIME YEAR TO FRACTION; } [...] } } RETURN USER, CURRENT; } end procedure; } I think, it is not possible to use a stored procedure returning more than 1 value in - the WHERE clause of the SELECT stmt - the COLUMNS chosen in the SELECT stmt e.g --- Select my_proc(1), col1, col2 from tab1 where col1 = someValue } -- } MfG } Kai Pr'nte } _______________________________________________________________________ } Kai Pr'nte | Web: http://www.quantum.de/pub/kp.html } Quantum Software GmbH | Internet: mailto:pruente@quantum.de } Dortmund Germany | Telefon: +49-231-9749-189 } } -- Rajiv Jhaveri ( rajivp@qsun.ho.att.com) DBA