Re: 2 parameters from spl in a select statement
Posted in 2003
I understand... and this "FROM TABLE(MULTISET(EXECUTE PROCEDURE cursory_multivalue_spl()))" Is very interesting... worth to investigate. Chucho Jonathan Leffler wrote: >>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. > -- Atte, Jes's Antonio Santos Giraldo jeansagi@myrealbox.com jeansagi@netscape.net sending to informix-list