I am trying to query a table from a database. I am able to query from other tables, even the table that I want, just not one specific column that I need. I am trying to execute the following:
install.packages("RODBC") library(RODBC) #connect to the database: ch<-odbcConnect("DS", uid="**", pwd="**", believeNRows = FALSE, rows_at_time = 1) query_1 <- 'SELECT One, Two, Three FROM TableOne;' query_2 <- 'SELECT Two FROM TableOne;' query_3 <- 'SELECT One, Three FROM TableOne;' names <- sqlQuery(ch, query_1, believeNRows=F, rows_at_time = 1, max=0, buffsize=480000)
When I execute query_1 (the desired query) I get 0 obs. of 3 variables as my output dataframe.
When I execute query_2 (the column with the error) I get 32 obs. of 1 variable but it should be around 500,000obs.
When I execute query_3 (excluding the error column) I get all the observations and everything loads in fine.
Any help would be appreciated! I cannot seem to figure out this error.