I am using MySQL for this so no MSSQL solutions please :)
I need to join a table containing UK Postcodes with another table that uses
postcode areas to split mail into 8 groups.
As an example, the groups table contains the following 3 rows...
PCG | Code
-----------
B | 2
BD | 1
BFPO | 5
Where B refers to Birmingham addresses, BD to Bradford and BFPO to the
British Military.
The coresponding address postcodes could be...
B3 0XX
BD12 0XX
BFPO 58
As examples.
Now to my join problem, I clearly cant join fixed numbers of characters
(left(postcode,2)) for example as some groups have only 1 character and 1
has 4. what I need is some sort of...
FROM addresses a
LEFT JOIN postcodeGroups g
ON (g.postcodegroup = a.REGEX)
Where a.regex is some fancy expression to select all available letters
before the first number (or space, or any non [a-z|A-Z] character). Can
this be done in MySQL and if so how?
--
Jay
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.5/376 - Release Date: 26/06/2006
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:5:210356
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/5
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:5
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54