SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Getting only Street name suite information from the address.


Getting only Street name suite information from the address.

Author
Message
Dreamsz
Dreamsz
Valued Member
Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)

Group: General Forum Members
Points: 69 Visits: 567
Hi All,

Thanks for looking into my post, well I been scratching my head for a long time now the requirement which sound pretty simple turned out to be a tough one, below is the requirement....

I need to seprate (Street Number, Street Name, Suite\Apt information or any zip found)

Address looks like this

1) 123 Main St
2) 123 NW.17 St
3) One Washington Way, Suite 405
4) 1 Governement Dr #400, Washington, 01211

So far I was able to seprate out 123 Main St, but whenever I go further using Char\Pat index in my string the address from above line 2 gets scramblled such as it becomes (123 NW St)

My main gole is to break htis string and put it in a table and then concatinate.....

Any help would be much appreciated.
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (85K reputation)SSC Guru (85K reputation)SSC Guru (85K reputation)SSC Guru (85K reputation)SSC Guru (85K reputation)SSC Guru (85K reputation)SSC Guru (85K reputation)SSC Guru (85K reputation)

Group: General Forum Members
Points: 85448 Visits: 41078
Dreamsz (4/15/2013)
Hi All,

Thanks for looking into my post, well I been scratching my head for a long time now the requirement which sound pretty simple turned out to be a tough one, below is the requirement....

I need to seprate (Street Number, Street Name, Suite\Apt information or any zip found)

Address looks like this

1) 123 Main St
2) 123 NW.17 St
3) One Washington Way, Suite 405
4) 1 Governement Dr #400, Washington, 01211

So far I was able to seprate out 123 Main St, but whenever I go further using Char\Pat index in my string the address from above line 2 gets scramblled such as it becomes (123 NW St)

My main gole is to break htis string and put it in a table and then concatinate.....

Any help would be much appreciated.


I've been through this before. It's a real PITA. My recommendation is to buy some CASS certification software and, because they've actually seen it all, will be a lot more successful at it that any home-grown solution you or I could write. They also have the advantage of knowing every street name in the U.S. and all of its territories.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search