Page 1 of 1

Oracle OCI Stagge

Posted: Mon Oct 26, 2009 10:19 am
by nanthakumar_v
Hi,

I am unable to execute two sql commands in before sql tab of Oracle_OCI stage.

For example

insert into test values('a','b');
commit;
update test set ind='Y' where ind = 'N';
commit;

But i am getting the below error :
JobTest..Oracle_OCI_0: ORA-00900: invalid SQL statement

Please let me know is it possible or execute or not. But the sql queries is perfect without syntax error. So there is no sql syntax problem




Re: Oracle OCI Stagge

Posted: Tue Oct 27, 2009 12:23 am
by sachin1
Yes i am also getting the same error, but the single statement executes fine, so what should be the seperator between two statement to work fine in before sql of oracle OCI.

Re: Oracle OCI Stagge

Posted: Tue Oct 27, 2009 5:12 am
by Sathishkumarins
:? Oracle OCI Stage supports multiple queries in before as well as in after stage. You can even remove COMMIT bcoz it is available as default.
The seperator is also fine. Can u provide the metadata for Test table?

Please check whether all the queries which u gave in that OCI Stage works fine or not.

Posted: Tue Oct 27, 2009 9:27 am
by ray.wurlod
I have a vague memory that you need double semi-colons. (;;)

Posted: Tue Oct 27, 2009 9:45 am
by chulett
It should work with either. The difference from what I recall is whether they run all in one session or indivual sessions. Right, here we go:
Each SQL statement is executed as a separate transaction if the statement separator is a double semi-colon ( ;; ). All SQL statements are executed in a single transaction if a semi-colon ( ; ) is the separator.