2 sql statements in a Teradata After Sql-tab

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
vdr123
Participant
Posts: 65
Joined: Fri Nov 14, 2003 9:23 am

2 sql statements in a Teradata After Sql-tab

Post by vdr123 »

Can anyone let me know if we can put more than 1 SQL statement in teradata's OCI "after SQL"-tab...
I have tried them using a semi-column ';' and it didnot work...

Eg:
Update;
Update

I would like to avoid writing BTEQ script just for this purpose...

Your feedback is highly appreciated...
rasi
Participant
Posts: 464
Joined: Fri Oct 25, 2002 1:33 am
Location: Australia, Sydney

Post by rasi »

Only one SQL statement can be executed at once inside the plug-in. If you want to execute Multiple SQL then have to output streams and put you SQL accordingly.

Thanks
Siva
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It may depend on the plugin. The OCI stages do support multiple statements, this is pulled from the online help:
If you specify multiple SQL statements, they are executed as one transaction. Do not use a trailing semicolon. Transactions are terminated by a double semi-colon ( ;; ).
I know you can use multiple sql statements in User Defined SQL, but not sure if you can in the 'Before/After' tabs. :? Never tried.

You'd need to check the docs for the Teradata plugin.
-craig

"You can never have too many knives" -- Logan Nine Fingers
vdr123
Participant
Posts: 65
Joined: Fri Nov 14, 2003 9:23 am

Post by vdr123 »

I have tried it again with the same SQL's...

eg:
Update;
Update

It seems to work...it doesnt complain!!!

Thank You for your feedback...
Post Reply