Hi,

I am having a strange problem with a sqlite3 database. See the following 
transcript:

 > sqlite3 kdb "select * from kfz where kfznr=48482364;"
 > 48482364|48|0|0C|00|00|0||20|5B93|1746294314|||0|GP-T 1006|0

kfznr is the primary key, so this is to be expected. Now two queries as 
fired from the application code:

 > sqlite3 kdb "select * from kfz where CRC32=-797785824;"
 > 48482364|48|0|0C|00|00|0||20|5B93|-797785824|||0|GP-T 1006|0
 > 20209001|20|1|3C|00|32|24999||13|CE42|-797785824|||0|FL-HH 11|1
 > 20209001|20|1|3C|00|32|24999||13|CE42|-797785824|||0|FL-HH 11|1

 > kdb "select * from kfz where CRC32=-1509747892;"
 > 48482364|48|0|0C|00|00|0||20|5B93|-1509747892|||0|GP-T 1006|0
 > 20209667|20|1|3C|00|32|202880||99|4FBD|-1509747892|||0|FL-AK 98|1
 > 20209667|20|1|3C|00|32|202880||99|4FBD|-1509747892|||0|FL-AK 98|1

What could cause 48482364 to show up in both results with a different 
value for CRC32?

The table is defined like this:

 > CREATE TABLE IF NOT EXISTS KFZ (
 >       kfznr TEXT PRIMARY KEY,
 >       partnernr INTEGER,
 >       sendtoTA INTEGER,                      
 >       saeule TEXT,
 >       berechtigung2 TEXT,
 >       berechtigung TEXT,
 >      a_km TEXT,
 >      max_km TEXT,
 >      kont TEXT,
 >      pincode TEXT,
 >      CRC32 INTEGER,
 >      verweis BLOB,
 >      handynummer TEXT,
 >      sperrung TEXT,
 >        kennzeichen TEXT,
 >      kontingentierung INTEGER);
 >
 > CREATE INDEX IF NOT EXISTS IDX_KFZ_PARTNERNR ON KFZ (sendtoTA,partnernr);
 > CREATE INDEX IF NOT EXISTS IDX_KFZ_CRC32 ON KFZ (CRC32);
 > CREATE INDEX IF NOT EXISTS IDX_KFZ_VERWEIS ON KFZ (VERWEIS);
 > CREATE INDEX IF NOT EXISTS IDX_KFZ_HANDYNUMMER ON KFZ (HANDYNUMMER);

Ciao, MM
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to