At 18:09 22/12/2011, you wrote:

DELETE FROM t WHERE rowid !=
(SELECT t2.rowid FROM t t2 where t2.num = t.num ORDER BY t2.date LIMIT 1);

Are you sure that date will collate correctly, as entries appear to be in dd/mm/yyyy format?

Dates in non_ISO format are always a pain. IMHO if dates are to be stored in string format, then one should always store them in YYYY/MM/DD (with leading zeroes) then eventually display dates in whatever format suits users at the application level.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to