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 |
|
Scrappus
Starting Member
2 Posts |
Posted - 2011-06-04 : 16:52:27
|
| I have a question… does anybody know the code that would parse a compound address field’s data into a new table?Table#1 – 1 column hold’s exiting data that will always look like this:Col# 1: 3208 VENTANA HILL DR, LAS VEGAS, 89117Copied into Table#2:Column# 0 – 4Street Number,Street Name,City,Zip? thanks |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-06-05 : 03:36:15
|
| is the individual parts always separated by comma? also are there always a maximum of four parts alone for an address? if yes, make use of PARSENAME function------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-06-07 : 07:24:04
|
| Search for Split function in this forumMadhivananFailing to plan is Planning to fail |
 |
|
|
Seventhnight
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2011-06-07 : 08:59:05
|
Or this fancy article http://www.sqlservercentral.com/articles/Tally+Table/72993/Corey I Has Returned!! |
 |
|
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2011-06-07 : 09:03:29
|
If it is too fancy, just skip all the gory details and go on to Fig 21 in that article which has the script for the split function.Ok, ok, "gory" may have been too harsh a word, but you know what I mean... |
 |
|
|
Seventhnight
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2011-06-07 : 09:09:20
|
I have to say... i thoroughly enjoyed reading that a couple of weeks ago...Sad... I know.Corey I Has Returned!! |
 |
|
|
|
|
|