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 |
Tade
Starting Member
5 Posts |
Posted - 2010-10-13 : 07:03:47
|
Hey everyone.I have a table with the following columns (example):ID Writers1 John Doe2 Doe John3 Dohn Joe4 Nohj EodI've been looking around to find a script/query/stored procedure that will split the Writers column into two new columns named "FirstName" and "LastName", respectively. All the stored procedures I found were either not good for me (Relied on the fact that the column to split has numbers that follow patterns) Or just plain not worked (Random errors that I couldn't figure out).I was wondering if someone could help me find a way to reach the above table example, to the following: ID Writers FirstName LastName1 John Doe John Doe 2 Doe John Doe John 3 Dohn Joe Dohn Joe 4 Nohj Eod Nohj Eod Thanks a bunch in advance. |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
|
Tade
Starting Member
5 Posts |
Posted - 2010-10-13 : 09:35:03
|
Had to play around a bit with the script to match it to my own, but it eventually worked, thanks!Truly, you are a Flowing Fount of Yak Knowledge. |
 |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-10-13 : 09:54:30
|
quote: Originally posted by Tade Had to play around a bit with the script to match it to my own, but it eventually worked, thanks!Truly, you are a Flowing Fount of Yak Knowledge.
thx No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|