I want to perform insert operation on a list of objects.
My insert query looks like below
insert into table name (#[flowVars['columnNames']]) values (#[flowVars['values']])
#[flowVars['columnNames'] contains the comma separated columnNames like col1,col2
#[flowVars['values'] contains #[payload.?val1], #[payload.?val2]
I get the below error.
Invalid column name '@P0'. (com.microsoft.sqlserver.jdbc.SQLServerException)
How can i solve this issue?
I can suggest you debug and check whether you have correct value has been set for flowVars['columnNames'] and flowVars['values'], also you can put it in logger to see its value in log. Then check if the output from the above is matching with the column name required for this insert operation.