Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parsing an Address 1

Status
Not open for further replies.

Hillary

Programmer
Feb 15, 2002
377
US
We have a SQL based proprietary database as a Student Management System. On the address table, the street address (ie 123 Main st) is all stored in one field.

I have been asked to create a report by Street Name. Is there a formula that will pick up an address after the first break?

For example, I need a formula that will return Main St for each of the following addresses...

5 Main St
36 Main St
759 Main St
8634 Main St
54878 Main St

Thanks,

Hillary
 
Hi,
Look at the help files for usage of the InStr function
( InStr({datafield}, " ") returns the position of the first space in that field's data string, for instance)

..Combined with the Mid string function you should be able to get what you need..

( for instance Mid({datafield}, InStr({datafield}, " ") )

If all your data has the desired string as everything after the first space, this will work..Otherwise you may need to test for other spaces..




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top