Re: 2 parameters from spl in a select statement
Posted in 2003
Topics: SQL Development & Query Writing, Stored Procedures & SPL
in the spl return 2 variables... Francisco Amauri wrote: > How can i do this query > > select spl_name("10") from table > > to return 2 parameters from this procedure (spl_name) > > please help me > -- Atte, Jesus Antonio Santos Giraldo ----------------------------------- jeansagi@myrealbox.com jeansagi@netscape.net sending to informix-list
> Francisco Amauri wrote: > >>How can i do this query >> >>select spl_name("10") from table >> >>to return 2 parameters from this procedure (spl_name) Jean Sagi wrote: > in the spl return 2 variables... That does not work, I'm afraid. That is, you can make the SP return multiple values in each call, but you cannot then use it in a SELECT statement. You have to use EXECUTE PROCEDURE spl_name("10"). That will, if treated the same as a SELECT statement, return multiple values in each row. Inside a SELECT statement, you cannot usually use 'cursory' procedures which have RETURN ... WITH RESUME, nor can you usually use procedures which return multiple values per call. The 'usually' is there because you may be able to do something with FROM TABLE(MULTISET(EXECUTE PROCEDURE cursory_multivalue_spl())) but the names of the table columns are problematic, etc. This is IDS 9.x only, if at all. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/