ALTER STATEMENT In ODBC

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
dganeshm
Premium Member
Premium Member
Posts: 91
Joined: Tue Aug 11, 2009 3:26 pm

ALTER STATEMENT In ODBC

Post 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 ??
Regards,
Ganesh
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Where you providing that, in the main sql or before/after tab?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
dganeshm
Premium Member
Premium Member
Posts: 91
Joined: Tue Aug 11, 2009 3:26 pm

Post by dganeshm »

It doesnt have a before/after sql..this is in the main sql..
Regards,
Ganesh
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
dganeshm
Premium Member
Premium Member
Posts: 91
Joined: Tue Aug 11, 2009 3:26 pm

Post 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..
Regards,
Ganesh
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Make sure there is no new line character or even an extra space in your sql. Sometimes that causes issues.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply