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-22 : 03:35:37
|
| Hi all,i have one variable @a(this variable contains emailid's)@a value is 1@y.com2@y.com3@y.comhow to split this variable into semi-colon separated:ex:1@y.com;2@y.com;3@y.comRegardsSweetyThanks & RegardsSweet_77 |
|
|
Sachin.Nand
2937 Posts |
Posted - 2010-10-22 : 04:12:47
|
| [code]declare @a varchar(20)='1@y.com2@y.com3@y.com'select replace(@a,'.com','.com;')[/code]But are you sure all email id's will have a domain with .com?PBUH |
 |
|
|
sweet_777
Starting Member
16 Posts |
Posted - 2010-10-22 : 04:19:18
|
| No some mailid ends with .in , some ends with .comlike thatThanks & RegardsSweet_77 |
 |
|
|
Sachin.Nand
2937 Posts |
Posted - 2010-10-22 : 04:24:14
|
| You need to find all the possible existing domain extenstions & use replace function for each one of them.PBUH |
 |
|
|
|
|
|