Reputation: 6339
I am executing below commands in R:
dbhandle <- odbcDriverConnect('driver={SQL Server};server=serveripaddress;database=DBName;uid=sa;pwd=pwd;')
FactActivity <- sqlQuery(dbhandle, "SELECT DimCourseID,DimPatientID FROM DWH.FactActivity", as.is=TRUE)
nrow(FactActivity)
In my database I have total 238634 rows but in R I am getting total rows = 237652.
This is happening for all tables (I tried it for three tables).
Any idea what am I missing which is reducing no of rows in my resultset in R?
Upvotes: 6
Views: 685
Reputation: 173
I had the same problem, couldn't solve it, eventually switched to using RJDBC with a Java driver to get around it.
Upvotes: 1