What's the best way to parse an Address field using t-sql or SSIS?

Posted by dtaylo04 on Stack Overflow See other posts from Stack Overflow or by dtaylo04
Published on 2010-04-30T20:05:38Z Indexed on 2010/04/30 20:17 UTC
Read the original article Hit count: 173

Filed under:
|
|
|
|

I have a data set that I import into a SQL table every night. One field is 'Address_3' and contains the City, State, Zip and Country fields. However, this data isn't standardized. How can I best parse the data that is currently going into 1 field into individual fields. Here are some examples of the data I might receive:

'INDIANAPOLIS, IN 46268  US'
'INDIANAPOLIS, IN 46268-1234  US'
'INDIANAPOLIS, IN 46268-1234'
'INDIANAPOLIS, IN 46268'

Thanks in advance! David

© Stack Overflow or respective owner

Related posts about t-sql

Related posts about string-manipulation