Page 1 of 1

2 sql statements in a Teradata After Sql-tab

Posted: Sun Oct 31, 2004 9:27 pm
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...

Posted: Mon Nov 01, 2004 4:46 pm
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

Posted: Mon Nov 01, 2004 4:54 pm
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.

Posted: Tue Nov 02, 2004 11:51 am
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...