Hi All,
While executing jobs with ODBC stages often I get the following 2 errors which I am unable to comprehend:
1)Invalid Cursor state.
2) SQL statement has incorrect number of result columns( this error occurs when I use a ODBC stage for Lookup)
Please help me in understanding why these errors occur and how to solve them.
Could someone also give some clue on how to use stored procedures through Datastage
Thanks in advance..
Regards,
Nilotpal
SQL error Messages
Moderators: chulett, rschirm, roy
Hi Nilotpal,Hi All,
While executing jobs with ODBC stages often I get the following 2 errors which I am unable to comprehend:
1)Invalid Cursor state.
2) SQL statement has incorrect number of result columns( this error occurs when I use a ODBC stage for Lookup)
Please help me in understanding why these errors occur and how to solve them.
Could someone also give some clue on how to use stored procedures through Datastage
Thanks in advance..
Regards,
Nilotpal
you have to be careful with your statements. When doing lookup you have to ensure, that you get back only one row.
If the lookup fits to more then one row you get this error-message. You can filter your lookup for example with a group by statement for to get back only one row.
Wolfgang