Extract Housenumber from street field

I get the problem to extract the housenumber from street adress.
i have to create 2 fields one with street and one the number.
in most cases they are delimited with a blank char.
 
tx.
ebertsysAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dbaSQLCommented:
Here's a quick example:

DECLARE @streetAddress VARCHAR(100)
SET @streetAddress = '1110 Cleveland Ave'

SELECT
    SUBSTRING(@streetAddress, 1, CHARINDEX(' ',@streetAddress) - 1) [HouseNumber],
    SUBSTRING(@streetAddress, CHARINDEX(' ',@streetAddress) + 1, LEN(@streetAddress)) [Street]
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Vitor MontalvãoMSSQL Senior EngineerCommented:
How do you know which part of the address has the house number?
For example: "5th Avenue 235"
0
ebertsysAuthor Commented:
we do that in more steps.
first create 2 colums on for street and one for numbers.
we have also HillStr.32
so we must do it step by step..and the rest will do an appl. found in internet who gives all adresses worldwide..1000adresses 40€
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.