Reputation: 1
I am trying to write an EXECUTE statement in toraclerow
.
At each iteration the string is prepared dynamically from the flow. Here I am not discussing how I have prepared the string. But once prepared the entire string is stored in a single context variable. For example I have the following string stored in a context variable at a given iteration number.
context.FinalString = "Insert into TargetTableName (columnA, columnB)
SELECT Col_A, Col_B
FROM SourceTableName"
I am trying to execute this string in the tOracleRow component using the following statement:
"EXEC SQL EXECUTE '"+context.FinalString+"'"
On running the job I am getting the following error.
ORA-00900: invalid SQL statement
Kindly suggest a solution. Is there a way to execute a sql statement stored as a string in a context variable?
Upvotes: 0
Views: 1482
Reputation: 1011
try to execute by removing text EXEC SQL EXECUTE ..just simply the text should be the statement - insert into table select col from table... or update table set column=value where ...
you dont need exec sql execute text here.
Upvotes: 1