Dear R-users,

I am working with R version 2.10.1 and package RODBC Version: 1.3-2 under 
windows.

Say I have a table "testtable" (in an Access data base), which has many 
different columns, among them a character column "X" with "integer-like" data 
as "0012345".
Using sqlFetch, I'd like to assure that column X is read in as a character 
variable. So what I'm looking for is something between these two approaches:

> sqlFetch(channel, "testtable") # -> column X is automatically converted to 
> character (so 0012345 becomes 12345)
> sqlFetch(channel, "testtable", as.is = TRUE) # -> all columns are converted 
> to character

I guess I'm looking for something like argument "colClasses" in function 
"read.table", is there a something similar in RODBC?

Your advice is appreciated;
kind regards
Heinrich.

______________________________________________
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.

Reply via email to