My Target is an UDB table and I wanted to run a SQL using the stage variable from the transformer stage to update another control table.
Actually I need to update the control table only once(I can do at the last row) ..I am trying ways to avoid Aggregator Stage.
please help.
can I refer to a stage variable in an after stage SQL??
Moderators: chulett, rschirm, roy
Re: can I refer to a stage variable in an after stage SQL??
No, you cannot refer a stage variable outside of the current transformer. you can write the value of that stage variable in a flat file or an hash file and then use it in the SQL in a database stagensm wrote:My Target is an UDB table and I wanted to run a SQL using the stage variable from the transformer stage to update another control table.
Thanks,
Chad
__________________________________________________________________
"There are three kinds of people in this world; Ones who know how to count and the others who don't know how to count !"
Chad
__________________________________________________________________
"There are three kinds of people in this world; Ones who know how to count and the others who don't know how to count !"
if you really want to use that stage variable in an SQL, you might be able to, (depending on the SQL you are trying to execute,) :
try to convert the sql into routine or function or implemet inside the transformer with the help of transformer functions, new stage variables.
try to convert the sql into routine or function or implemet inside the transformer with the help of transformer functions, new stage variables.
Thanks,
Chad
__________________________________________________________________
"There are three kinds of people in this world; Ones who know how to count and the others who don't know how to count !"
Chad
__________________________________________________________________
"There are three kinds of people in this world; Ones who know how to count and the others who don't know how to count !"