error of dynamic SQL

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • lizayica@yahoo.ca

    error of dynamic SQL

    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.proposa l_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

    #2
    Re: error of dynamic SQL

    lizayica@yahoo. ca wrote:[color=blue]
    > 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.proposa l_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'.[/color]
    What's that '(' before the select? Must be coming from somewhere...



    --
    Serge Rielau
    DB2 SQL Compiler Development
    IBM Toronto Lab

    Comment

    Working...