Re: Searching addresses

From: J.P. <jp_boileau_at_yahoo.com>
Date: 28 Feb 2002 12:39:01 -0800
Message-ID: <7e388bc3.0202281239.7d3f6762_at_posting.google.com>


Personally, I'd be very tempted to create a lookup table for "most commonly used" abbreviations, such as "N."/"North", "Pkwy"/"Parkway".

Just a thought.

You also may want to look into the "Soundex" function.

JP

markg_at_mymail.tm (MarkyG) wrote in message news:<ab87195e.0202280745.5ca0001d_at_posting.google.com>...
> The only way to do this *i think* is to separate each part of your
> input string and do an AND search on the relevant field
>
> e.g
>
> SELECT *
> FROM table
> WHERE address_line like '%N%'
> AND address_line like '%Col%'
> AND address_line like '%Pky%';
>
> You may have a problem with the first search since your lines begin
> with N and i'm doind a wildcard search '%N%', should really be 'N%'.
> However, it gives you the general idea! You may want to create
> dynamic SQL to separate the users input and create your clause with
> enough searches.
>
> M
>
>
>
> "spare_brain" <spare_brain_at_yahoo.com> wrote in message news:<a5k366$mtg19_at_kcweb01.netnews.att.com>...
> > Folks,
> >
> > I am trying to find examples of SQL snippets that shows an address search as
> > follows. Such searches are very common in map searching.
> >
> > For example, the "Address_Line" attribute has entries of the form
> >
> > 100 N. Columbia Pky
> > 100 N. Columbia Parkway
> > 100 North Columbia Pky
> > 100 North Columbia Parkway
> > 222 North Columbia Pky
> >
> > Now, my search query should be such that when the user enters "N Col Pky",
> > it should fetch all of these entries.
> >
> > Could someone provide some pointers, and/or other leads into finding similar
> > examples?
> >
> > Any help would be great and save a SQLed soul.....so Thanks!
> >
> > sb
> > -----------------------------
> > "..Life is like a database query, you never know what'cha gonna get.."
Received on Thu Feb 28 2002 - 21:39:01 CET

Original text of this message