473,761 Members | 3,542 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Extracting Street Number

Hi,

I'm trying to clean up a large database in Access. I have one field for
address, which needs to be broken up into Street Number, Street Name, and
Street Label (St., Road, etc.)

The problem is that the data is very dirty. So some addresses will be
standard "456 XYZ Road," while others won't have a number and will just say
"XYZ Industrial Park," meaning I can't just use Instr to search for the
first space because sometimes the street number needs to be left blank.
Rather, I need to use a command to cycle the first few characters and tell
if they're numeric or alphabetical, copying them only if they're numeric.
Anyone have any ideas how to do this (i.e. how to tell if they're numeric or
not) or any link that has a little code snippet to do this?

Thanks in advance.
Nov 13 '05 #1
7 3003
Upon closer examination of my data, it appears that there's good news and
bad news. The bad news is that often the street number comes after the
street name, e.g. XYZ Road 3, so I can't just use Val to pick out the first
numerical values from the string, because it will run into the alphabetical
characters first and return a -1.
On the other hand, there are no streets with numbers in them. So I just need
to take all of the numbers in the string (though some may have characters in
the middle, e.g. 13/7, and I want that slash to remain with the numbers) and
store them separately. Any idea how I can do that? How can I pull out just
the part of the string from the first number to the last number?
Thanks again in advance.
"Raphi" <le**@DELETE.TH IS.optonline.ne t> wrote in message
news:ce******** ***@netnews.upe nn.edu...
Hi,

I'm trying to clean up a large database in Access. I have one field for
address, which needs to be broken up into Street Number, Street Name, and
Street Label (St., Road, etc.)

The problem is that the data is very dirty. So some addresses will be
standard "456 XYZ Road," while others won't have a number and will just say "XYZ Industrial Park," meaning I can't just use Instr to search for the
first space because sometimes the street number needs to be left blank.
Rather, I need to use a command to cycle the first few characters and tell
if they're numeric or alphabetical, copying them only if they're numeric.
Anyone have any ideas how to do this (i.e. how to tell if they're numeric or not) or any link that has a little code snippet to do this?

Thanks in advance.

Nov 13 '05 #2
If the 'number substring' contains no embedded spaces, you could scan for
the first numeric char., and the first subsequent space, and take the chars
between as being the street number. I don't know how you can differentiate
the street name and label though. You might have 'Acacia Avenue' or 'The
Poplars'..... And how about named (rather than numbered) addresses?

Dave

"Raphi" <le**@DELETE.TH IS.optonline.ne t> wrote in message
news:ce******** ***@netnews.upe nn.edu...
Upon closer examination of my data, it appears that there's good news and
bad news. The bad news is that often the street number comes after the
street name, e.g. XYZ Road 3, so I can't just use Val to pick out the first numerical values from the string, because it will run into the alphabetical characters first and return a -1.
On the other hand, there are no streets with numbers in them. So I just need to take all of the numbers in the string (though some may have characters in the middle, e.g. 13/7, and I want that slash to remain with the numbers) and store them separately. Any idea how I can do that? How can I pull out just
the part of the string from the first number to the last number?
Thanks again in advance.
"Raphi" <le**@DELETE.TH IS.optonline.ne t> wrote in message
news:ce******** ***@netnews.upe nn.edu...
Hi,

I'm trying to clean up a large database in Access. I have one field for
address, which needs to be broken up into Street Number, Street Name, and Street Label (St., Road, etc.)

The problem is that the data is very dirty. So some addresses will be
standard "456 XYZ Road," while others won't have a number and will just say
"XYZ Industrial Park," meaning I can't just use Instr to search for the
first space because sometimes the street number needs to be left blank.
Rather, I need to use a command to cycle the first few characters and tell if they're numeric or alphabetical, copying them only if they're numeric. Anyone have any ideas how to do this (i.e. how to tell if they're

numeric or
not) or any link that has a little code snippet to do this?

Thanks in advance.


Nov 13 '05 #3
"Raphi" <le**@DELETE.TH IS.optonline.ne t> wrote in
news:ce******** ***@netnews.upe nn.edu:
Hi,

I'm trying to clean up a large database in Access. I have one
field for address, which needs to be broken up into Street
Number, Street Name, and Street Label (St., Road, etc.)

The problem is that the data is very dirty. So some addresses
will be standard "456 XYZ Road," while others won't have a
number and will just say "XYZ Industrial Park," meaning I
can't just use Instr to search for the first space because
sometimes the street number needs to be left blank. Rather, I
need to use a command to cycle the first few characters and
tell if they're numeric or alphabetical, copying them only if
they're numeric. Anyone have any ideas how to do this (i.e.
how to tell if they're numeric or not) or any link that has a
little code snippet to do this?

Thanks in advance.

I can't think of a single valid reason to break up an address field
into street number, street name and street type.

Save yourself a lot of trouble for nothing.

--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #4
In message <ce***********@ netnews.upenn.e du>, Raphi
<le**@DELETE.TH IS.optonline.ne t> writes
Hi,

I'm trying to clean up a large database in Access. I have one field for
address, which needs to be broken up into Street Number, Street Name, and
Street Label (St., Road, etc.)

The problem is that the data is very dirty. So some addresses will be
standard "456 XYZ Road," while others won't have a number and will just say
"XYZ Industrial Park," meaning I can't just use Instr to search for the
first space because sometimes the street number needs to be left blank.
Rather, I need to use a command to cycle the first few characters and tell
if they're numeric or alphabetical, copying them only if they're numeric.
Anyone have any ideas how to do this (i.e. how to tell if they're numeric or
not) or any link that has a little code snippet to do this?


If you need to do this I would consider multi-pass processing with a
flag field to indicate that the address has been processed. Use a
different value in the flag field for each rule that you apply, that way
you can easily reverse out any errors you discover later.

Look for a series of rules that will each process one format of address,
and then set the flag. The obvious one is where the first token in the
address is a numeric group, extract this and set the flag.

Keep a count of the number of unprocessed records and when this reaches
a manageable level switch to manual processing.

Randomly select a number of the automatically processed addresses for
manual checking.

If you intend to mailshot the people on the list make sure that you ask
for address corrections and return of undeliverable mail, at least for
the first mailshot after you use the new addresses. Expect a higher than
normal number of returns.

--
Bernard Peek
London, UK. DBA, Manager, Trainer & Author. Will work for money.

Nov 13 '05 #5
I will break the street name from the street number if I plan to sort by
street names, or look for addresses close by.
Fred Zuckerman
"Bob Quintal" <rq******@sPAmp atico.ca> wrote in message
news:Xn******** **************@ 66.150.105.49.. .
I can't think of a single valid reason to break up an address field
into street number, street name and street type.

Save yourself a lot of trouble for nothing.

Nov 13 '05 #6
"Fred Zuckerman" <Zu********@sbc global.net> wrote in
news:WG******** *********@newss vr27.news.prodi gy.com:
I will break the street name from the street number if I plan
to sort by street names, or look for addresses close by.
Fred Zuckerman
"Bob Quintal" <rq******@sPAmp atico.ca> wrote in message
news:Xn******** **************@ 66.150.105.49.. .
I can't think of a single valid reason to break up an address
field into street number, street name and street type.

Save yourself a lot of trouble for nothing.

Much better to just use the postal code for that.

--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #7
Unless you only want 'close' neighbors (about a block)
Postal code would include 1000's of addresses.
Fred

"Bob Quintal" <rq******@sPAmp atico.ca> wrote in message
news:Xn******** **************@ 66.150.105.49.. .
"Fred Zuckerman" <Zu********@sbc global.net> wrote in
news:WG******** *********@newss vr27.news.prodi gy.com:
I will break the street name from the street number if I plan
to sort by street names, or look for addresses close by.
Fred Zuckerman
"Bob Quintal" <rq******@sPAmp atico.ca> wrote in message
news:Xn******** **************@ 66.150.105.49.. .
I can't think of a single valid reason to break up an address
field into street number, street name and street type.
Save yourself a lot of trouble for nothing.


Much better to just use the postal code for that.
Bob Quintal

Nov 13 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
4620
by: Sugapablo | last post by:
I have a database table that contains street addresses in the following format: 123 Any St. 456 Some Rd. 7789 That Blvd. etc. I.e. Street number, street name, standard abbriviation of road type.
0
2247
by: Ole | last post by:
Good day, perhaps someone is interested in enhancing this regular expression (^((\w+)(\-)?|(\.)?)+((\w+)((\s)+|((\.)(\s)*)))(\d+)) it is meant to filter a string, corresponding to a valid german street + housenumber entry like Hans-Ebert-Weg Nr. 120
1
2264
by: Al Dykes | last post by:
Does anyone have an idea on how to find ZIP+4 codes? Thanks -- a d y k e s @ p a n i x . c o m Don't blame me. I voted for Gore.
2
6199
by: wolftor | last post by:
Does anyone know how to create a query that will separate the street number from the street name? Eg. current address field = 14 Main Street, unit 4 but I want to get: streetno = 14 streetname = Main Street
4
5524
by: Tom Warren | last post by:
About once a year or so for the last 10 years, I update my street address parser and I'm starting to look at it again. This parser splits a street address line into its smallest common elements (number, trailer, pre, name, suffix, post, unit, unit id). I always start this update process by searching Google-Groups and Google-web for anything new out there, but there is never very much. Has anyone run into anything in their travels?...
4
3794
by: Robert Fitzpatrick | last post by:
Thanks to some help here on the list, I've been able to get addresses sorting pretty well, but now I have a issue with same addresses on different streets not grouping the streets. This is what I'm using a substring search in the ORDER BY statement now like in this view: SELECT tblhudsimilargroups.rems_id, tblhudsimilargroups.group_id, tblhudsimilargroups.similar_group_id, tblhudbuildings.address, tblhudbuildings.hud_building_id,...
6
2730
by: Amma | last post by:
Hello Every one , Pls help me to extracting number from a text file since I am new to perl programming . I have a file and need to extract the number after semicolon in that -----------------Contents of the file ----------------------- Total Number Of Inputs From Rajasthan is: 1675
4
8680
by: Ant | last post by:
Hi all, My kids have a bunch of games that have to be run from CD (on Windows XP). Now they're not very careful with them, and so I have a plan. I've downloaded a utility (Daemon Tools) which allows me to mount and unmount virtual CD drives onto an ISO image. This works well, but I want to wrap this in a Python GUI which will present them with a list of games in a particular directory. Essentially the steps are this:
4
2926
by: HowHow | last post by:
Using Access 2000. I need to group the address by suburb then by street name in my report. Two major problems here: 1. Unit number has the word "Unit" before number 2. Semi detach house has "a" or "b" after number Examples of the addresses as below. Address 1 means the first line/field for users to key address in line one, Address 2 means second line/field two for users to key address, normally village, park or street name eg.1,...
0
9554
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9377
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10136
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9989
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
6640
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3913
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3509
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.