I created a procedure with dynamic SQL. Building is successful.But when
I run it, it shows me the following error:
A database manager error occurred.[IBM][CLI Driver][DB2/NT] SQL0104N
An unexpected token "pd.proposal_id , pd.item_id , psd.year_id" was
found following "( select". Expected tokens may include:
"<space>". SQLSTATE=42601
In procedure, the part is
' select pd.proposal_id '||
' ,pd.item_id '||
' ,y.year_id '||
What is wrong? There do have spaces following 'select'.
Thanks for help!
Serge Rielau - 29 Aug 2005 18:55 GMT
> I created a procedure with dynamic SQL. Building is successful.But when
> I run it, it shows me the following error:
[quoted text clipped - 10 lines]
>
> What is wrong? There do have spaces following 'select'.
What's that '(' before the select? Must be coming from somewhere...

Signature
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab