Page 1 of 1

Oracle Stage after SQL

Posted: Fri Oct 05, 2012 6:47 pm
by wjblack74
I'm using an Oracle connector and am trying to use one of the incoming columns as part of the after SQL statement within the connector.

Oracle Table being written to: TableA
After SQL table being written to:TableB
Incoming column to be written to TableA and also used in the after SQL table TableB:ColumnA

Since it's an incoming column to the connector does it have to include ORCHESTRATE as part of the name? What is the correct syntax?

Example:
UPDATE TableB SET MyField = ORCHESTRATE.ColumnA

Re: Oracle Stage after SQL

Posted: Fri Oct 05, 2012 10:21 pm
by chulett
wjblack74 wrote:I'm using an Oracle connector and am trying to use one of the incoming columns as part of the after SQL statement within the connector.
You can't. The before and after areas are not aware of nor have any access to data on the link.

Re: Oracle Stage after SQL

Posted: Sat Oct 06, 2012 5:18 am
by wblack
OK. if you don't have access to the incoming schema and what you need could be pulled from what you just wrote to TableA could you do something like

Example:
UPDATE TableB SET MyField = (select MAX(ORCHESTRATE.ColumnA) from TableA)

Posted: Sat Oct 06, 2012 7:42 am
by chulett
Or split off a link to an aggregator with that value and then to the second target. Your aggregation method can ensure it only gets one row at the end of the job, if that's what you are trying to do.