Sqlquery in R does not return all rows from a query

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 rows of 238634 , but in R I get total rows = 237652 .

This happens for all tables (I tried it for three tables).

Any idea what I'm missing that reduces the number of rows in my result set in R?

+3


source to share


1 answer


I had the same problem, couldn't solve it, ended up switching to using RJDBC with Java driver to get around it.



+1


source







All Articles