Getting trouble in execute SQL script plugin

When I use execute sql script plugin to write complex sql queries such as inner queries the workflow gets executed but I’m not getting expected output as well as it does not reflect in database.

yes i am also facing the same issue.

Hi! Shivendra

image

Verify whether the Execute for each row? option is selected. For the SQL to start at the initialization phase of the transformation, ensure that Execute for each row? is not selected.

As an extra option, you can return the total number of inserts (INSERT INTO statements), updates (UPDATE table), deletes (DELETE FROM table) and reads (SELECT statements) by specifying the field names in the lower right of the dialog. This can help you debug.

1 Like

Hi Seema.
We have found that for return of count information, there should only be one operation per script and would like to verify if this is the behavior that should be taken in consideration creating the scripts in this step.
For example, to get number of INSERT stats, only insert step should be used.
If you try to do INSERT with UPDATE on conflict, then it will only provide Update stats.

Hi! Willem,
Hi! Willem,
You mean if the script contains Insert and Update i.e. Upsert it shows all the records in the Update Stats output field.

Yes, that is what I experienced.
Also, with this plugin, I had to separate update and insert in that order but experienced that the update does also do the insert.
Have to try it again with an easy WF to be sure it is this behavior.

Yes whenever I use multiple inner queries then the only one query gets executed and other are not gets executed.

Hi! Akash,

Please share your workflow so we can try to give some insight.