On 2 Oct 2009, at 2:13pm, Reusche, Andrew wrote:

> sqlite> pragma integrity_check;
>
> wrong # of entries in index sales_datetime

Which version of SQLite are you using ?

DROP the index then MAKE it again, then do the 'PRAGMA  
integrity_check' thing again.

If that didn't help I suspect that that table (or maybe the entire  
database) is terminally corrupt somehow.  Using the command-line tool  
on that database (take a backup copy first):

Dump all the data from that table using .dump .
DROP the table.
Read the dump you made using .read .

Do the 'PRAGMA integrity_check' thing again.  If it's still bad,

Dump all the data from all tables using .dump .
Quit the tool.  Delete your database file.  Start the tool up again  
(it'll make a blank database file for you)
Read the dump you made using .read .

If you're using a recent version of SQLite please keep a copy of the  
corrupt database file: someone on this list might be interested in  
looking at it for debugging purposes.

For more information on the command-line tool see

<http://www.sqlite.org/sqlite.html>

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

Reply via email to