Delete records based upon query results on another table

  • Thread starter Thread starter Ryan Barnes
  • Start date Start date
R

Ryan Barnes

This may sound difficult at first, but I am sure it's not that
complex.
My situation is this, I have 2 tables. On one table I have a list of
websites my users go to, on the other table I have a list of websites
that I know are not pornographic, gambling, bandwidth waste, and so
on. Sites like google.com and yahoo.com are good sites, so I want to
delete them from my table of user's visits.. an example may help..

GoodTable
google.com
yahoo.com
msn.com

WebHits
www.hotmail.com
www.espn.com
www.google.com
www.google.com
www.yahoo.com
www.networksolutions.com
and so on..

I want to have a query that will delete any records in the WebHits
table that are LIKE any records in the GoodTable. For example..
it would delete www.google.com because it was LIKE "google.com" see
what I'm getting at?

If you could help me out that would be great!
 
Sal,
I have no idea how you made that work, but it did! That is totally
awesome! I now realize I need to get a book on this stuff because your
SQL syntax was so far over my head I would have never figured that out
on my own! Thank a million!

Ryan Barnes
Webmaster, LAN Administrator
 
Back
Top