I have to run an SQL query that iterates cursor over a larger table (MS SQL Server 2014). It would be rather difficult not to use a cursor for this particular purpose.
我必须运行一个SQL查询,在一个较大的表上迭代鼠标(MS SQL Server 2014)。为了达到这个目的,不使用游标是相当困难的。
The cursor-related code is kept in a stored procedure. R only evaluated EXEC dbo.do_something
. EXEC dbo.do_something
works as expected when running the code from MS SQL Management Studio. When I run it via RODBC, the query aborts without error message after 30 secs. I guess this is the value of "Connection Timeout".
与指针相关的代码保存在一个存储过程中。只对执行部分dbo。do_something进行评估。EXEC dbo。do_something在运行来自MS SQL Management Studio的代码时正常工作。当我通过RODBC运行它时,查询在30秒后没有错误消息的情况下中止。我猜这是“连接超时”的值。
What options do I have to make the query work with R?
我有什么选项可以让查询与R一起工作?
1 个解决方案
#1
2
It seems the answer to my particular problem is rather simple: Add SET NOCOUNT ON
to the proc definition.
似乎我的问题的答案相当简单:在proc定义中添加SET NOCOUNT。
#1
2
It seems the answer to my particular problem is rather simple: Add SET NOCOUNT ON
to the proc definition.
似乎我的问题的答案相当简单:在proc定义中添加SET NOCOUNT。