Trigger a SQL query

(Jayant Singh) #1

Hello colleagues,
We are trying to use a workflow, which will trigger a SQL query, given a particular event.

The trigger condition is: If a column in a particular table changes value at least one of the rows.

For example, the column col1 initially is;



Suppose the new values in col1 are



As we see one row has changed. That’s when we want to execute our SQL query.
Can we kindly get some advice/points which workflow option can be used here?

thanks in advance

(Victoria Tuktarova) #2

Hello Jayant,

I am afraid there is no out of the box solution, because you can’t compare the column to itself using our tools. For this purpose you would have to have a copy of needed column to compare.

The solution you are looking for might vary depending on your exact use case and database you use. But I have discussed your request with our colleagues and we have found the solution from the third party source that might meet your needs. You might find this guide useful. Please, note that the information provided on this website might not be up to date and completely correct as we have not tested it on our side.

After configuring the above part, you can use the “Wait for SQL value” task polling for the result from the particular CDC solution (if it’s not NULL trigger the SQL, if it is NULL - rinse and repeat until the time out (which can be right before the next scheduled instance of this workflow is triggered, effectively keeping the polling going on infinitely)).

Kind regards,