dbTalk Databases Forums  

Is This Possible?

comp.database.ms-access comp.database.ms-access


Discuss Is This Possible? in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ornot2b
 
Posts: n/a

Default Is This Possible? - 07-01-2003 , 03:52 PM






I have 2 tables xxx and yyy

xxx contains data such as..
"1234.frf.com"
"derf.fred.com"
"werf.fred.com"
"sed.cmcm.net"

yyy contains data such as..
"fred.com"
"joe.com"
"bob.net"

I want do delete everything in xxx that is like the data in yyy ie...

"DELETE * FROM xxx WHERE field LIKE '%fred.com'"
"DELETE * FROM xxx WHERE field LIKE '%joe.com'"

Can this all be done with one SQL statement? Can the LIKE operator be
concatenated with a SELECT?

I envision it as something as this
DELETE *
FROM xxx
WHERE ([xxx].[field])
LIKE '%' & (SELECT field
FROM yyy)

Thanks




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.