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