[R-sig-DB] R-sig-DB Digest, Vol 84, Issue 4
Jim Holtman
jho|tm@n @end|ng |rom gm@||@com
Mon Oct 10 05:09:25 CEST 2011
if you want 18 numeric digits to compare, read them in from the database as a character for comparison.
Sent from my iPad
On Oct 9, 2011, at 19:33, "Mai Dang @BigPond" <mdang2 using bigpond.com.au> wrote:
> Hi Jim,
>
> I tried to compare 2 columns (18 digits numeric format) from 2
> different databases.
>
> Mai
>
> On Sun, Oct 9, 2011 at 9:00 PM, <r-sig-db-request using r-project.org> wrote:
>> Send R-sig-DB mailing list submissions to
>> r-sig-db using r-project.org
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>> https://stat.ethz.ch/mailman/listinfo/r-sig-db
>> or, via email, send a message with subject or body 'help' to
>> r-sig-db-request using r-project.org
>>
>> You can reach the person managing the list at
>> r-sig-db-owner using r-project.org
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of R-sig-DB digest..."
>>
>>
>> Today's Topics:
>>
>> 1. Re: sqlQuery precision issue (jim holtman)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Sat, 8 Oct 2011 13:08:06 -0400
>> From: jim holtman <jholtman using gmail.com>
>> To: "Mai Dang @BigPond" <mdang2 using bigpond.com.au>
>> Cc: "r-sig-db using r-project.org" <r-sig-db using r-project.org>
>> Subject: Re: [R-sig-DB] sqlQuery precision issue
>> Message-ID:
>> <CAAxdm-4FeC5yvH6kHzgELOwxAVFdn4_LE2O63nU396Co47G9RA using mail.gmail.com>
>> Content-Type: text/plain
>>
>> Probably FAQ 7.31
>>
>> Floating point numbers only have about 15 digits of precision.
>>
>> On Saturday, October 8, 2011, Mai Dang @BigPond <mdang2 using bigpond.com.au>
>> wrote:
>>> Hi All,
>>>
>>> Can you please have a look at precision issue in sqlQuery statement
>>> as below example
>>>
>>> This is not related to the database as this fault is reproducible with
>>> different databases.
>>>
>>>> library(RODBC)
>>>> orcl<- odbcConnect("orcl",uid="user_id",pwd="password")
>>>> ca_con <- format(sqlQuery(card, paste("select '453458325698925182' as
>> long_string from dual")), digits=20)
>>>> ca_con
>>> LONG_STRING
>>> 1 453458325698924992
>>>
>>>
>>> Mai Dang
>>>
>>> _______________________________________________
>>> R-sig-DB mailing list -- R Special Interest Group
>>> R-sig-DB using r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-db
>>>
>>
>> --
>> Jim Holtman
>> Data Munger Guru
>>
>> What is the problem that you are trying to solve?
>>
>> [[alternative HTML version deleted]]
>>
>>
>>
>> ------------------------------
>>
>> _______________________________________________
>> R-sig-DB mailing list
>> R-sig-DB using r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-db
>>
>>
>> End of R-sig-DB Digest, Vol 84, Issue 4
>> ***************************************
>>
>
> _______________________________________________
> R-sig-DB mailing list -- R Special Interest Group
> R-sig-DB using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-db
More information about the R-sig-DB
mailing list