04-25-2018 08:22 AM
Hello,
Hoping someone can help with this one. I’ve got a parameter which captures a sql statement from the user. I am executing this sql using a redshift execute snap. The problem is, the sql statement can hold multiple statements separated by a semi-colon(;). As long as the first statement executes without an issue, the snap always returns success even though there are errors in the sql and it was not able to execute it.
I cannot use the multi-execute snap as I do not know how many statements there will be in the parameter from the user.
I have tried adding a begin and end statements, whilst this does rollback any truncates, it still returns success.
How can I execute a statement, of which, length is unknown, number of statements is unknown and I get the accurate message returned from the snap.
Many thanks in advance,
06-28-2018 05:38 AM
Has anyone else faced this issue?