Open Command in Oracle Enterprise stage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
jreddy
Premium Member
Premium Member
Posts: 202
Joined: Tue Feb 03, 2004 5:09 pm

Open Command in Oracle Enterprise stage

Post by jreddy »

Can i do an update/delete on a different table than what is being used in the SELECT of the oracle enterprise stage? They both are in the same schema

My scenario is to first run an update on <table1> before i start reading another table <table2>. Can i do both in one Oracle Enterprise stage.. ?

I have used Open command option on the stage where i specified the update statement. The job when run doesnt throw any errors, but it doesnt execute the update either..
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

It is possible. May the update condition is not met. Try something like a truncate on a temp table that has a few rows to verify that it actually works.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
jreddy
Premium Member
Premium Member
Posts: 202
Joined: Tue Feb 03, 2004 5:09 pm

Post by jreddy »

I actually have no condition for the update.. i just have a plain 'update <tablename> set <column_name> = sysdate

When i enclose the update in single quotes, i get the sql -900 error (Invalid SQL statement), but when i remove the single quotes around it and just use the simple update statement , i get no errors, but i get no result either !!
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Did you actually code a reject link in your output stage to see if some error is being found on the execution of the statement?

Normally I wouldn't see a problem with user-defined SQL going to a different table in the same instance.
jreddy
Premium Member
Premium Member
Posts: 202
Joined: Tue Feb 03, 2004 5:09 pm

Post by jreddy »

No ArndW, i have no reject link. This is a source stage reading data from an oracle table, so i havent coded a reject link. There is just no entry in the director log for me to know whether this (BEFORE) OPen command did anything or not.. i mess with the syntax, it throws me an error though !!
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Do things change if you add a semicolon? Also, this will get executed on each processing node (in this case it wouldn't make much of a difference, but it is important to realize what DS does).
Post Reply