split street number and street address

G

gloria

Non programmer asks for syntax help:

typical addresses are 220 Broadway, 151 E. 42nd Street, 21
Bertha Drive, etc.

I need address to split in fields which I'll call
streetnumber and streetname.

Suggestions for appropriate update language in query are
requested which I can copy and paste into an update field.
 
J

JulieD

Hi Gloria

this should work
StreetNumber: Left([address],InStr([address]," ")-1)
StreetAddress: Right([address],Len([address])-InStr([address]," "))

Where [address] is the name of your current field

here's the sql view of an update query using the above
UPDATE Table3 AS Table3_1 SET Table3_1.streetnumber =
Left([address],InStr([address]," ")-1), Table3_1.streetname =
Right([address],Len([address])-InStr([address]," "))
WHERE (((Table3_1.address) Is Not Null));


Regards
JuielD
 
J

JulieD

Hi Rich

thanks for the feedback ... this is a fantastic resource isn't it!

Cheers
JulieD
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top