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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Break a string 1

Status
Not open for further replies.

Brogrim

Technical User
Jul 28, 2000
184
IE
I have a field with the address entered in as
101 Duke street

I want to divide this field into house no and address. is there a query I can use to break this string
 
HNum:left([Address],instr([Address]," ")-1)
HStreet:mid([Address],instr([Address]," ")+1)
 
Just to throw a spanner in the works - what if the address is:

The Green Cottage Duke Street
or
The Green Cottage 101 Duke Street

addresses don't, unfotunately, all follow the pattern:
number streetname

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top