Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have an sql query followed by another sql query.
how to pass the output of 1 to the input of 2 .
I have used tdbinput followed by tdbrow. Its not working
My first query :"SELECT * FROM a WHERE STAGING_STATUS='N' AND ROWNUM <= 1 order by created_date asc"
SECOND QUERY :
"SELECT
A.ID,
A.RECEIVED_DATE,
A.FILE_NAME,
B.ID AS TXN_ID,
B.MERCHANT_NUMBER,
B.TXN_DATE,
B.TXN_TIME,
B.TXN_CURRENCY_CODE,
B.TXN_VALUE,
B.TXN_TYPE,
B.RETAILER_REFERENCE
FROM ABC A ,
BCD B
WHERE A.ID=B.HDR_ID
AND A.ID = ?"
Hi,
Could you please try the below method where the output of the first method will be used as the input for second?
The tFlowtoiterate component will be as shown below which means id column from first query will be passed as a value in iterative fashion.
In the second query, after your current query, add a + and give Control+Space. It will show the list of available variables. Please select the variable shown below (the output variable from first query)
Once its selected, you will see the query similar to below screenshot.
I believe this should resolve your issue. If the answer has helped you, could you please mark the topic as resolved? Kudos are also welcome 🙂
Warm Regards,
Nikhil Thampi
Hi,
Could you please try the below method where the output of the first method will be used as the input for second?
The tFlowtoiterate component will be as shown below which means id column from first query will be passed as a value in iterative fashion.
In the second query, after your current query, add a + and give Control+Space. It will show the list of available variables. Please select the variable shown below (the output variable from first query)
Once its selected, you will see the query similar to below screenshot.
I believe this should resolve your issue. If the answer has helped you, could you please mark the topic as resolved? Kudos are also welcome 🙂
Warm Regards,
Nikhil Thampi
Hi ,
thanks for ur detailed explanation . i have done the same bt after last log pallete,nothing is getting printed in logs .Can u suggest why ?
Hi,
Could you please print and see whether variable of tflowtoiterate is having data? Could you please share your job and component details so that I will get more idea about the flow?
Warm Regards,
Nikhil Thampi
Hi nikhil,
in the tdbinput what should we specify in the table name textbox in case of queries where there is a join of 2 or more tables?
Hi,
You can add either one of the two tables in the table name text box. But please note that you will have to provide the query by yourself in the query area of the component.
Warm Regards,
Nikhil Thampi