?sqlQuery as.is - argument Andrija On Jun 7, 2013 9:10 PM, "Sneha Bishnoi" <sneha.bish...@gmail.com> wrote:
> Hey all! > > I am trying to select a bunch of id's (data type -character) from a table > and store them in a variable in R > But when i do this, it automatically truncates the leading zero's in id's > even though they are of character type. > > code is :- > > >myconn<-odbcConnect("testdata") > >sql.select<-paste("select UNIT_ID from UNITS where (UNIT_TYPE='",unit,"' > and COMMUNITY='",property,"')",sep="") > > unit_ids<-sqlQuery(myconn,sql.select) > >print(unit_ids) > is there anyway i can retain the UNIT_ID's as they are. > > Thanks! > Sneha > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.