About the author
cs_Referrals and cs_Urls need to have [DatabaseName].Owner in front of it...
The SQL reads like so:
DELETE FROM cs_ReferralsWHERE UrlID IN( SELECT UrlID FROM cs_Urls WHERE Url LIKE 'http://google.%' OR Url LIKE 'http://%.yahoo.%' OR Url LIKE 'http://yahoo.%' OR Url LIKE '%/Search/%' OR Url LIKE '%/Search?%' OR Url LIKE 'http://search.%' OR Url LIKE 'http://bloglines.%')
DELETE FROM cs_UrlsWHERE Url LIKE 'http://google.%' OR Url LIKE 'http://%.yahoo.%' OR Url LIKE 'http://yahoo.%' OR Url LIKE '%/Search/%' OR Url LIKE '%/Search?%' OR Url LIKE 'http://search.%' OR Url LIKE 'http://bloglines.%'