Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Getting only Street name suite information from the address. Expand / Collapse
Author
Message
Posted Monday, April 15, 2013 3:33 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, September 5, 2014 1:48 PM
Points: 49, Visits: 398
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.
Post #1442510
Posted Monday, April 15, 2013 4:44 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 8:14 PM
Points: 37,107, Visits: 31,665
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."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1442533
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse