Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Identify postcode within 3 possible fields 1

Status
Not open for further replies.

katieb

Technical User
Feb 18, 2003
12
GB
I have a database that contains a large amount of addresses. The problem is that the postcode is not always in the POSTCODE field, it could be in 2 other fields. How can I build a query to identify the contents of a cell where it could be in the format:
"xx xxx"
"xxx xxx"
"xxxx xxx"

Doing a search just on field length and identifying 6 7 and 8 lengths doesn't work as some towns have 6, 7 and 8 lengths.

I would then need to copy the postcode into a new field where they will all go.

Thanks for any help you can give me.

Kate
 
A starting point:
... WHERE ...
And ([field name] Like '?? ???' Or [field name] Like '??? ???' Or [field name] Like '???? ???')

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
That has worked a treat!

Thanks very much.

Kate
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top