Re: MySQL Select help needed
- From: Dave Brown <dave@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 19 Apr 2005 22:52:01 +0100
Hi David,
My concern there is when I get a Postcode that may not have a space delimiter.
Dave. David Harper wrote:
Dave Brown wrote:
If I have a table that contains the column partpostcode and has these entries,
PE10
PE15
PE1
What I want to do is select those rows where the partpostcode exists in a given parameter,...
i.e something liek.
Select * where partpostcode IS CONTAINED IN "PE10 1AF"
Why not have your Java client code split the postcode e.g. "PE10 1AF" into two parts, "PE10" and "1AF", then look for an exact match to the first part?
British postcodes have a regular structure, so this will always work, and in addition, the prefix part "PE10" always refers to a meaningful geographic region, so it makes sense from this viewpoint too.
David Harper Cambridge, England
.
- Follow-Ups:
- Re: MySQL Select help needed
- From: David Harper
- Re: MySQL Select help needed
- References:
- MySQL Select help needed
- From: Dave Brown
- Re: MySQL Select help needed
- From: David Harper
- MySQL Select help needed
- Prev by Date: Re: MySQL Select help needed
- Next by Date: Re: MySQL Select help needed
- Previous by thread: Re: MySQL Select help needed
- Next by thread: Re: MySQL Select help needed
- Index(es):