Page 1 of 1

Open Command in Oracle Enterprise stage

Posted: Mon Jul 16, 2007 1:57 pm
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..

Posted: Mon Jul 16, 2007 7:30 pm
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.

Posted: Mon Jul 16, 2007 7:47 pm
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 !!

Posted: Mon Jul 16, 2007 8:10 pm
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.

Posted: Thu Jul 19, 2007 9:31 am
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 !!

Posted: Thu Jul 19, 2007 8:08 pm
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).