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 |
|
gangadhara.ms
Aged Yak Warrior
549 Posts |
Posted - 2009-08-25 : 01:39:26
|
| Dear All,I have a column with value FS\Atallam, I need to separate FS\ always,and need to display only Atallam, how can we do this ?Thanks |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-08-25 : 01:45:03
|
| declare @str varchar(32)select @str = 'FS\Atallam'select substring(@str,charindex('\',@str,1)+1,len(@str))select right(@str, len(@str) - charindex('\',@str,1)) |
 |
|
|
gangadhara.ms
Aged Yak Warrior
549 Posts |
Posted - 2009-08-25 : 01:51:49
|
| Thanks a lot it worked out for me.. |
 |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-08-25 : 01:53:13
|
welcome |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-08-25 : 03:31:36
|
| orselect PARSENAME(replace(@str,'\','.'),1)MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|