SQL Server 2016 SSIS从存储过程获取游标 [英] SQL Server 2016 SSIS get cursor from stored procedure
问题描述
我正在使用SQL Server2016.
I am using SQL Server 2016.
-
我有一个存储过程
GET_RECORDS
,该过程使用过滤器的输入参数并输出CURSOR
参数
I have a stored procedure
GET_RECORDS
that takes input parameters for filter and outputs aCURSOR
parameter
我想在我的SSIS程序包中获取此光标
I want to get this cursor in my SSIS package
我创建了数据流任务,OleDb源和用于参数值的变量.然后映射参数
I had created data flow task, OleDb source and variables for parameter values. Then mapped parameters
但是当我想保存组件时-我遇到了错误
but when I wanted to save the component - I got an error
我尝试添加带有一些虚拟列的子句WITH RESULT SETS
,但是我的过程未返回任何结果集
I tried to add clause WITH RESULT SETS
with some dummy columns, but my procedure doesn't return any result set
我在做什么错了?
任何建议都会有所帮助.
Any advices will be helpful.
谢谢.
关于,尤里.
推荐答案
尝试返回记录并在ETL中使用foreach代替光标
try to return the records and use foreach in ETL instead of cursor
https://www. simple-talk.com/sql/ssis/implementing-foreach-looping-logic-in-ssis/
我认为您可以通过一种简单的方法来做到这一点,但是我不知道您在做什么,
I think you can do it from a simple way, but I don't know what you are you doing, exactly...
这篇关于SQL Server 2016 SSIS从存储过程获取游标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!