Showing posts with label Calling SQL procedure using R. Show all posts
Showing posts with label Calling SQL procedure using R. Show all posts

Wednesday, 29 October 2014

Calling SQL Stored procedure from R


The Following lines in R calls a stored  procedure in SQL SEREVR 

library(RODBC)
conn <- odbcDriverConnect('driver={SQL Server};server=HostName;database=DatabaseName;uid=useName;pwd=Password')
query <- paste("exec  dbo.R_getData ");
res<-sqlQuery(conn, query);