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

rjapala
New Contributor III

Thank you for reply @alchemiz

I tried with your suggestion but even throwing same error

image

Your missing the replace function

"UPDATE rakesh_sf_customer_order SET Error_reason = '\$Error_reason' WHERE Customer_ID = '\$Customer_ID'".replace(/\$\w+/gi, m=> eval(m) ).replace(/โ€˜nullโ€™/gi, โ€˜nullโ€™)

The closing ";" is what causing the batch operation failed

rjapala
New Contributor III

Thank you so much @alchemiz

I removed semicolon ; in the my sql execute snap then the query is working fine now.

@darshthakkar Thank you for the support, Now query is working fine

image

Great news, something new we all learned today.
Incredible community!

CC: @dmiller

darshthakkar
Valued Contributor

Thatโ€™s good news @rjapala, congratulations.
Iโ€™m still amused on why your previous query didnโ€™t work, I will try it out on my end when I find a use case and share the findings here.