sql - SSIS SQL执行任务错误:无法运行一些sql查询
问题描述
我正在制作一些事实表(从一些资源中获取一些数据,进行一些转换并将它们放入一个表中)。我的主要困境是除了选择、更新和插入之外,我无法运行任何 SQL 查询。一旦我尝试:
exec someProcedure
或条件语句 ( if @part1 ...
) 甚至 ( create table ...
) 我会出错。打开任务以构建我的 SQL 语句并查找问题,它给出的错误范围从(不支持 Set SQL 构造或语句。)到(不支持 EXEC SQL 构造或语句。)。我在 stackoverflow 上寻找了许多主题,但没有一个真正解决了我的问题。
谢谢,
您可以在这张照片中看到我所面临的情况:
我希望像往常一样在 SSIS 中运行我的 SQL 命令。
解决方案
Try changing the SQL Source Type from Direct Input
to Stored Procedure
and just specify the stored procedure name instead of Exec stored procedure
Also make sure that you have selected the relevant TargetServerVersion
from the project configuration:
Based on your comments, you are using SQL Server 2012 with Visual Studio 2010 which are not compatible.
You have to use Visual Studio 2012 or 2015+ (backward compatibility added). You can refer to the SSIS tag wiki for more info:
推荐阅读
- angular - 是否可以在同一端口上托管 Angular 8 构建副本和 Slim/Lumen PHP 框架以避免 apache 服务器中的 CORS 问题
- matlab - 如何加快在服务器上的 VM 上运行非常缓慢的 Matlab 矩阵乘法?
- javascript - 希望 react-hamburger-menu 图标位于与汉堡包图标具有相同行为的容器中
- mysql - Mysql在安装过程中不会启动服务器
- angular - 注入服务时无法解析组件的所有参数
- node.js - 未加载样式表,即使已配置静态
- python - vtkXMLPolyData Writer/Reader 不可逆
- java - 调用 Oracle 存储过程抛出原因:java.sql.SQLException:无效的列类型:1111
- google-cloud-platform - 从 Pub/Sub 订阅中提取的 Google Cloud Function 引发异常 - 已超过截止日期
- javascript - React - 如何从 JSON 文件呈现内容?