cancel
Showing results for 
Search instead for 
Did you mean: 

My sql execute snap

rjapala
New Contributor III

image
Am facing this error when am trying to update column data in SQL dynamically please can anyone give me a solution how to update with correct syntax using with expressions or without

21 REPLIES 21

smudassir
Employee
Employee

Share ur runtime id

ForbinCSD
Contributor

In the future, if you have trouble with building a dynamic SQL string, here is a good trick to use.

At least for testing, split your work into a Mapper Snap, then the Exec SQL snap.

Build your string in the mapper snap and map it to something like $query.

Then if you want to try executing it, have the SQL Snap simply execute $query with the [=] turned on.

You can disable the SQL snap until you think you are ready. And then you can play with the expression that builds the string, using the mapper. This will let you see exactly the string you are building, and your errors will often be a LOT more obvious.

You’ll notice this is what user @alchemiz did.

Just my $0.02 of help.