[R] RODBC and NULL values
Mark Wardle
mark at wardle.org
Wed Nov 15 11:58:08 CET 2006
chao gai wrote:
> Why would the database be so versatile anyway. Inf, -Inf, NA and NaN are not
> exaclty what one would use for say an inventory, personel adminstration or
> the such. These are probably not part of the SQL standard anyway.
>
Thanks for your reply. I have to agree with most of your suggestions,
and can easily workaround this NULL value issue. However, NULLs are part
of the SQL standard and one can check for them within ANSI SQL.
Perhaps my mistake was using NULLs as a meaningful entry. In my case,
that an event has not (yet) been reached. As I say, it is easily worked
around, but there may be something amiss with the way the ODBC driver is
reporting NULL values --- some clients can cope, but RODBC cannot. It
may be a primary problem with the ODBC driver itself, but I do not have
the understanding or skill to get to the bottom of the problem.
I will add one further diagnostic point. If I modify the table schema so
the column is of type "text" rather than "numeric" or "int4", then RODBC
works --- NULLs are properly transferred as NAs, and the data is
correctly identified as numeric (which I have to say is very clever!). I
don't know whether this fact is of any help.
Best wishes,
Mark
--
Dr. Mark Wardle
Clinical research fellow and Specialist Registrar in Neurology,
C2-B2 link, Cardiff University, Heath Park, CARDIFF, CF14 4XN. UK
More information about the R-help
mailing list