On 2/29/2012 3:24 PM, Bob Pawley wrote:
Hi
After importing to postgis from a shapefile I have some rows duplicated.
Is there a method of making all rows unique after the import.
I tried identifying the rows with “select * where is not unique” without
success.
Bob


Do you have a column that is different between the two rows?

Are you wanting to delete all but one of the rows?

something like:

delete from table where id in (select min(id) from table group by anotherColumn having count(*) > 1);

Totally untested, by the way, I'm mostly guessing.

try the inside to make sure it returns just the rows you want deleted.

-Andy

_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to