On 11/28/08, tom_slee <[EMAIL PROTECTED]> wrote:
>
>  I used the Numerical python package and its types don't always behave well
>  with other python variables - I had to insert into sqlite by piecing
>  togethera literal SQL statement rather than binding the variables. So no
>  doubt you are right and the problem is related to the number of digits or
>  the type of the python variable I was using.  I'll try to repeat using more
>  orthodox python types.
>
>  Many thanks,
>
>  Tom
>
>
>  Griggs, Donald-3 wrote:
>  >
>  >
>  > Hi, Tom,
>  >
>  >
>  > Regarding:  "Adding values to att0  (one of the numeric columns) gives
>  > this odd result:"
>  >
>  > I tried this on win xp 32 using the sqlite3.exe command-line interface
>  > and for me it *does* behave as expected.
>  >
>  > I tried it under sqlite 3.5.5 and under 3.6.6.2.
>  >
>  > I wonder if PHP (or something) is having a problem with the larger
>  > number of digits in the result when rowid=2?
>  >
>  > sqlite> select itemid, att0, (att0 + 0.95) dx from map;
>  > 0|0.0290534291416|0.9790534291416
>  > 1|-0.0737001597881|0.8762998402119
>  > 2|-0.957751333714|-0.00775133371400005
>  > 3|-0.229464128613|0.720535871387
>  > _______________________________________________
>  > sqlite-users mailing list
>  > sqlite-users@sqlite.org
>  > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>  >
>  >


There has to be something wrong with either your code or with the
Python interface you are using. It works fine for both via the sqlite3
shell (I am using SQLite v. 3.5.9 on Mac OS X) or via Perl DBI (which
uses sqlite 3.6.1). I get

0|0.0290534291416|0.9790534291416
1|-0.0737001597881|0.8762998402119
2|-0.957751333714|-0.00775133371400005
3|-0.229464128613|0.720535871387



-- 
Puneet Kishor http://www.punkish.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to