On 21 Apr 2014, at 11:18am, Neville Dastur <nevillebdas...@gmail.com> wrote:
> I have a column defined as hospitals_id TEXT PRIMARY KEY UNIQUE which stores > a GUID. Hence the text primary key. When I do an INSERT OR REPLACE the rows > are duplicated. I want to check that these keys really are duplicates and don't just look like they're duplicates. Copy your database to your computer and open it with the SQLite Shell Tool (or write some code to do these tests. Then try SELECT hospitals_id, length(hospitals_id), typeof(hospitals_id) FROM hospitals; SELECT hospitals_id, typeof(hospitals_id), COUNT(*) FROM hospitals GROUP BY hospitals_id; SELECT hospitals_id, typeof(hospitals_id), COUNT(*) FROM hospitals GROUP BY hospitals_id HAVING (COUNT(*) > 1); Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users