Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2007-03-07 : 08:43:29
|
| ray writes "I have a sql server 2005 database with one address column. It is formatted as any address, any city, any state, any zip.I need to split that address and each piece of info to 4 columns. One column for the address part, one for city, one for state, and one for zip codes. Thanks for your help." |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-03-07 : 09:22:52
|
make use of left(), right(), substring() etc to do it. KH |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-03-07 : 09:39:33
|
| Maybe some CHARINDEX/PATINDEX too?Peter LarssonHelsingborg, Sweden |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2007-03-08 : 16:30:10
|
| search fnSplitText in this forumit takes a string and a separator and returns n-number of rows depending on how many splits you expectedHTH--------------------keeping it simple... |
 |
|
|
|
|
|