Oracle OCI Stagge

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
nanthakumar_v
Participant
Posts: 2
Joined: Wed Feb 21, 2007 5:55 am

Oracle OCI Stagge

Post 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



sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Re: Oracle OCI Stagge

Post 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.
Sathishkumarins
Premium Member
Premium Member
Posts: 41
Joined: Tue Jul 08, 2008 5:45 am
Location: Columbus

Re: Oracle OCI Stagge

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I have a vague memory that you need double semi-colons. (;;)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply