我在 SSIS 中遇到了一些麻烦。我有多个表,我想添加 Truncate 语句,以便该表无法创建双数据。
这是我制作的包的图像:
每个数据流,我使用平面文件源和 ADO NET 目标。
然后,在执行 SQL 任务中我想应用截断表
之后,我收到错误消息:
"[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."
我必须做什么?
附注 抱歉,如果我的英语不好
最佳答案
由于目标是 Oracle 数据库,您应该使用以下语法:
begin
execute immediate 'truncate table t1';
execute immediate 'truncate table t2';
end;
关于sql - 如何在 SSIS 中截断多个表(使用 ADO.NET 目标和 Oracle 数据库),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22653018/