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 |