RODBC Temporary Table Issue when connecting to MS SQL Server

前端 未结 2 602
攒了一身酷
攒了一身酷 2020-12-03 04:57

I am running R on unix and I am using the RODBC package to connect to MS SQL server. I can execute a query that returns results fine with the package, but if I use a tempor

2条回答
  •  时光取名叫无心
    2020-12-03 05:28

    The RODBC driver seems to think that when SQL Server returns any count of rows that the entire statement is complete. So you need to set nocount on at the beginning of your statement or stored procedure that is called.

    set nocount on
    

    This allowed me to use a stored procedure that was using temporary table in R.

提交回复
热议问题