Thank you very much for your great help! I add "as.is=TRUE" in the sqlFetch
code, it works!

2012/8/1 Prof Brian Ripley <rip...@stats.ox.ac.uk>

> On 01/08/2012 10:11, delvin008 delta wrote:
>
>> Hi, all:
>>        This is the first time I use mail-list for help and I'm a student
>> from Chinese. So forgive my poor English skill.
>>        Here is the question: I have an excel file contains some stkcd
>> information. The stkcd is a string fill with numbers, e.g "000002". When i
>> use sqlFetch function from RODBC package. It will automatically read stkcd
>> as a number, e.g 2 which is truly confusing me. Any suggestions please.
>>
>
> No, it will not. It (like read.table) does so because you asked it to. See
> the 'R Data Import/Export Manual' (which has lots of good advice and should
> be basic reading for people importing data into R) and the help for
> sqlFetch (especially the as.is argument).
>
>
>
> --
> Brian D. Ripley,                  rip...@stats.ox.ac.uk
> Professor of Applied Statistics,  
> http://www.stats.ox.ac.uk/~**ripley/<http://www.stats.ox.ac.uk/~ripley/>
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272866 (PA)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>

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

Reply via email to