Re: Searching addresses

From: Ashish Mittal <mittalashish_at_yahoo.com>
Date: Tue, 05 Mar 2002 15:46:15 GMT
Message-ID: <bL5h8.4848$aP6.6228_at_rwcrnsc54>


Or you could use an available address database to do this for you. For example, g1db. The advantage being that you also can do address checking and you can update address checking independent of your database design.

Ashish
"J.P." <jp_boileau_at_yahoo.com> wrote in message news: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 Tue Mar 05 2002 - 16:46:15 CET

Original text of this message