There are multiple delete rows questions here, but this one is a little unique (not difficult, just unique). I have already ready the other thread found here:
http://stackoverflow.com/questions/18932/sql-how-can-i-remove-duplicate-rows
Question: I have a table with rowID,longitude,latitude,businessName,url, caption. This might look like:
rowID | long | lat | businessName | url | caption 1 20 -20 Pizza Hut yum.com null 2 20 -20 Pizza Hut null rabble rabble rabble
How do I delete all of the duplicates, but only keep the one that has a URL (first priority), or keep the one that has a caption if the other doesn't have a URL(second priority) and delete the rest?