Associate
- Joined
- 25 Aug 2008
- Posts
- 947
Hi,
Working on a large scale database and had the following thought...
When storing items such as postcode, would it be better to store it in stages?
Like TD 15 5BY OR TD15 5BY or TD155BY
I'm trying to create a coordinate system, that given latt/long it will spit out a list of results giving the postcode.
So i could have the table:-
and search :-
or have the following table:-
and the following search
I might just end up running tests to find out which is more efficient...
Working on a large scale database and had the following thought...
When storing items such as postcode, would it be better to store it in stages?
Like TD 15 5BY OR TD15 5BY or TD155BY
I'm trying to create a coordinate system, that given latt/long it will spit out a list of results giving the postcode.
So i could have the table:-
Code:
CREATE TABLE postcode
{
P1 varchar(2),
p2 Int,
p3 varchar(3)
}
Code:
SELECT *
FROM postcode
WHERE P1='EH'
AND P2=15
or have the following table:-
Code:
CREATE TABLE postcode
{
P1 varchar(7)
}
Code:
SELECT *
FROM postcode
WHERE P1 CONTAINS ('"EH15*" ')
I might just end up running tests to find out which is more efficient...