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 |
|
sweet_777
Starting Member
16 Posts |
Posted - 2010-10-21 : 07:26:11
|
| Hi all,I have a table i.e emptable emptable: columns are ,1.empid 2.empname 3.emailin emptable email column values are CE,MEEX:CREATE PROC SP_TEST(@EMPID INT)AS BEGINselect email from emptable where empid=1ENDusing above sp i will get output CE,MEBUT I NEED TO GET CE+ME LIKE THAThow to do thatRegardsRamaThanks & RegardsSweet_77 |
|
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
Posted - 2010-10-21 : 07:52:15
|
quote: Originally posted by sweet_777 RegardsRama Thanks & RegardsSweet_77
Is this question from somewhere else because two times regards with different names.If the column is having data like 'CE,ME' and you want to return output as 'CD+ME' then you can use replace function.If your requirement is something different then please post some sample data and expected output. |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-10-21 : 08:21:31
|
select replace(email,',','+') as email from emptable where empid=1 No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|
|