Reputation: 35
I got a little trouble in SSIS. I have multiple table and i want adding Truncate statement so that table can't create double data.
This is the image of package that I made :
each Data Flow, i used Flat File Source and ADO NET Destination.
And then, in Execute SQL Task i want to apply Truncate Table
After that, i have error message :
"[Execute SQL Task] Error: Executing the query "truncate table Table1 truncate table Tabl..." failed with the following error: "ERROR [HY000] [Oracle][ODBC][Ora]ORA-00911: invalid character". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly."
What i must suppose to do?
P.S Sorry if my english is not good
Upvotes: 2
Views: 8140
Reputation: 3728
Since the destination is an Oracle Database you should use this syntax:
begin
execute immediate 'truncate table t1';
execute immediate 'truncate table t2';
end;
Upvotes: 2
Reputation: 19184
Does this syntax work:
truncate table table1;
truncate table table2;
Note the semi colons.
Upvotes: 0