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 |
|
kid_on_the_block
Posting Yak Master
172 Posts |
Posted - 2006-03-20 : 23:38:30
|
| Have a column with the following dataafname.lnamefname1.lname1Now I need to seperate the fname & lastname into 2 different columns how to do this please help thanks |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-03-21 : 00:04:22
|
[code]select left(col, charindex('.', col) - 1), right(col, len(col) - charindex('.', col))from( select 'fname.lname' as col union all select 'fname1.lname1' as col) c[/code] KHChoice is an illusion, created between those with power, and those without.Concordantly, while your first question may be the most pertinent, you may or may not realize it is also the most irrelevant |
 |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
|
|
|
|
|