views:

21

answers:

0

I have a table that is made of the following structure

id, source , url , country

now the url column contains urls that can consist of both the root url and children urls. For example we could have

http://post-journal.com                       USA

http://www.post-journal.com

http://post-journal.com/news

http://post-journal.com/sports

also the source column matches the url value and the source column also has different combinations

The Post-Journal

Post-Journal                            USA

Post Journal via

Post Journal

What identifies the pair is the url. Now the country is assigned to the record from another table that had the source matched with the country so subsequently sources that did not match now have country as null. How do update all the records that have matching urls but the source can be linked or in otherwords are LIKE sources that matched the source in country table. There are sources that do not appear in the country table and also are not related to others by the url.

Any ideas appreciated.

related questions