I need to call an external stored procedure (creates QTEMP table) from
within a stored procedure, and then return a cursor that includes the
QTEMP table.

I'm getting SQLSATE 42601, "Token C1 was not valid". The syntax is fine
for the CALL and the DECLARE, but not if I put them together.

Is there a way to do this?


call external_stored_procedue(Parm1 => 'A', Parm2 => 'B');

declare C1 cursor with return for
select * from QTEMP.TABLE Q join LIVE.TABLE L on Q.ID = L.ID;
open C1;


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.