Getting SQL stored procedure results into data.frame format using RODBC

后端 未结 3 1962
感情败类
感情败类 2021-01-20 00:33

I am using the RODBC package to query for results in my SQL server. I have a certain stored procedure written that, when executed in my SQL Server Mgmt. studio (for example)

相关标签:
3条回答
  • 2021-01-20 00:45

    I had the same problem.

    You can try using:

    set nocount on
    

    in the MS SQL Server stored procedure so it will return just a dataset.

    Regards,

    0 讨论(0)
  • 2021-01-20 00:47

    Also try writing to a new data frame. I kept getting character(0) when I tried to overwrite an existing data frame with the sqlQuery function.

    0 讨论(0)
  • 2021-01-20 00:53

    Try this:

    sqlQuery(production,"exec port.tdp_RISK2_ModelRunCompare @ModelRunId1 = 399", errors=FALSE)
    
    0 讨论(0)
提交回复
热议问题