Hello,
I'm trying to export the result set from a DB2 stored procedure to a local file.
I've figured out how to do the same for a select statement using the following code:
Code:
export to C:\Users\Comrade\Documents\output.csv \
of del modified by nochardel \
select * from someschema.sometable
However, I'm not able to modify the same for a stored procedure. The following code
Code:
export to C:\Users\Comrade\Documents\output.csv \
of del modified by nochardel \
call someschema.somestoredproc
gives the following error:
Quote:
SQL0104N An unexpected token "END-OF-STATEMENT" was found following
"<identifier>". Expected tokens may include: "SELECT". SQLSTATE=42601
|
There are a few threads in which a similar question arises but I didn't find a satisfactory answer in either.
Please let me know if you have any ideas.