Page 1 of 1

SQL error Messages

Posted: Mon May 13, 2002 10:40 pm
by nilotpalr
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

Posted: Tue May 14, 2002 11:15 am
by WoMaWil
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

Hi 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