mic2100
10-19-2006, 01:33 PM
i am trying to produce a query that will look for a selected british postcode
example..
SELECT * FROM applicants WHERE postcode LIKE 'S1%%' OR postcode LIKE 'S2%%' OR postcode LIKE 'S3%%' OR postcode LIKE 'S4%%' etc...
i know this may seem pointless putting the number at the end of the letters but if you don't any postcode with 'S' at the beginning will be brought out of the db.
is there a way to make a statement like this
SELECT * FROM applicants WHERE postcode LIKE 'S(1-9)'
example..
SELECT * FROM applicants WHERE postcode LIKE 'S1%%' OR postcode LIKE 'S2%%' OR postcode LIKE 'S3%%' OR postcode LIKE 'S4%%' etc...
i know this may seem pointless putting the number at the end of the letters but if you don't any postcode with 'S' at the beginning will be brought out of the db.
is there a way to make a statement like this
SELECT * FROM applicants WHERE postcode LIKE 'S(1-9)'