How can I write the following query to work with a NOT LIKE subquery?
SELECT custno FROM customers WHERE postcode not like (SELECT postcode FROM mail_postcodes)
The MAIL_POSTCODES table contains values like 'L','BD','WF' however the values in this table are prone to change so the query CANNOT be hardcoded like:
SELECT custno FROM customers WHERE postcode not like 'L%' and postcode not like 'BD%' and postcode not like 'WF%'
So how is it possible to write a NOT LIKE subquery with values pulled from that table?
Thanks in advance.