09-04-2017 07:18 AM
I need an idea on how to proceed this. I want to run a node (mostly it would be a user written node) till I get value updated from another table.
Code 1 /SQL Join transformation :
select user_name,user_id,email_address,lot_name,completed_flag,process_date from user_table where completed_flag=1 and process_date="&sysdate."d;
Code 2 :
Send an email to user_name and email_address from Code1 ;
Now my requirement is to keep on checking for Code1 for entire day and the moment I get completed_flag's value as 1 , I need to send email to the users. In short, I need infinite while loop for Code1 till the day is completed.
Any help/idea is appreciated
09-04-2017 08:05 AM
09-04-2017 05:31 PM
As already mentioned that's something which should be done via scheduling. But to answer your question: You can use CALL SLEEP() or the SLEEP() function to pause a process for a defined amount of time. Just use this within your loop until the condition becames TRUE.
Once TRUE just jump out of the loop (using LEAVE).