Update sql statement #4576
Replies: 4 comments 7 replies
-
How does the UPDATE fail? |
Beta Was this translation helpful? Give feedback.
-
Can you show us your actual code from the transformer step to see what you are doing to make sure your other syntax/etc is correct? |
Beta Was this translation helpful? Give feedback.
-
🤔 that should work Are there errors in If you view the message and look at the "Mappings" do you see values for What are the column types for the |
Beta Was this translation helpful? Give feedback.
-
Pretty sure the problem is your parentheses. That is not valid SQL. You can also shorten your code by skipping the maps.get, which isn't necessary for your variable names. UPDATE Patient
SET Patient.Apellido = ${Apellido}, Patient.Nombre = ${Nombre}
Where Patient.PID = ${PID} |
Beta Was this translation helpful? Give feedback.
-
I don't have much knowledge of JAVA and I want to record from MIRTH in a database with sql statement.
The Insert work perfect but does not happen the same with the update
use the following code in the insert
INSERT INTO Patient (Apellido,Nombre)
VALUES (${maps.get('Apellido')}, ${maps.get('Nombre')})
and for the update
UPDATE Patient
SET Patient.Apellido = (${maps.get('Apellido')}, Patient.Nombre = ${maps.get('Nombre')})
Where Patient.PID = ${maps.get('PID')})
could someone give me a hand?
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions