which component should I use to execute a manual update statement?
(Right now using SQL query)
Error on the image.
which component should I use to execute a manual update statement?
(Right now using SQL query)
Error on the image.
Hi @juan.pech,
I believe it should work the way you have it. It looks like your value of Florida is not in single quotes which could definitely be an issue. The other thing to try is to remove all the commenting you have before and after the statement. Matillion can be finicky with extra non-runnable code in the component because it sometimes tries to wrap the code in the component with more SQL.
Another approach you could take is create a Transformation job where the input is a "Fixed Flow" (meaning a static value of 'Florida' for a billingstate column. You would then wire the Fixed Flow task to an Update Table task when you map the column of billingstate from the Fixed Flow task to the column in the table.
I can't remember if this works or not but you might be able to use the "Query Result to Scalar" for the update statement as well. If you attempt this, note that you won't be able to use the Sample button because it would be wrapping your update statement with a select statement.
Another approach which should be considered a last resort is to use a Python script task where you would leverage the Jython interpreter to send the update statement.
Hopefully these give you some thoughts that lead to solutions. 😀
Remove the comments after the SQL Query. And assuming the updating field is VARCHAR, quote it in Single quotes. It should solve your problem. :)
Hai @juan.pech
Can you pls try this update statement in orchestration sql component . if this sql from transformation means