问题描述
我想使用ssis软件包删除目标服务器(postgres)表中的数据。
I want delete the data in the target server(postgres) tables data using ssis package.
database : postgres server
Table : emp
in execute sql task :scriptis: delete from emp and connection used odbc
当我在sis包
中运行exec任务时,如果emp表中有数据,那么它的工作正常,当emp表中没有数据时,我得到了错误。
when i run the executesql task in ssis packageif emp table have data then its working fine and i am getting the error when emp table donot have data.
假设如果我在pgadmin工具中运行相同的查询,即使emp表没有数据,那次也没有收到任何错误。
suppose if i run same query in pgadmin tool that time it is not getting any error even though emp table donot have data.
如何避免在sis软件包中出现此问题?
how to avoid this issue in ssis package?
推荐答案
如果我理解正确,则DELETE语句包含该连接。我想您已经将ODBC连接管理器传递给了执行SQL任务属性-连接类型和连接。然后您的SQL脚本可能就是:
从emp删除;
If I understand correctly, The DELETE statement contains the connection. I guess you have passed the ODBC connection manager to the Execute SQL Task properties - Connection Type and Connection. Then your SQL script could be just:DELETE FROM emp;
这篇关于使用ssis包删除emp表数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!