Page 1 of 1

ALTER STATEMENT In ODBC

Posted: Thu Mar 25, 2010 11:04 am
by dganeshm
When I give the following user defined SQL in the ODBC Stage ...

alter sequence maximo.queryseq increment by ? .. its throwing an error ::


[DataStage][SQL Client][ODBC][IBM(DataDirect OEM)][ODBC Oracle Wire Protocol driver][Oracle]ORA-01722: invalid number
LASTQUERYID = 3881

Any ideas ??

Posted: Thu Mar 25, 2010 11:18 am
by DSguru2B
Where you providing that, in the main sql or before/after tab?

Posted: Thu Mar 25, 2010 11:30 am
by dganeshm
It doesnt have a before/after sql..this is in the main sql..

Posted: Thu Mar 25, 2010 11:32 am
by DSguru2B
I doubt you can provide any statement other than DML instructions there. What exactly are you trying to accomplish? The statement reveals that you are setting the sequence object for each incoming row. May I ask why?

Posted: Thu Mar 25, 2010 11:40 am
by dganeshm
I am trying to get the max sequence id in a previous stage pass it to this ODBC stage and altering the sequence to increment by that number... it works when I had code a value or pass it as job parameter..

Posted: Thu Mar 25, 2010 11:42 am
by DSguru2B
Make sure there is no new line character or even an extra space in your sql. Sometimes that causes issues.