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 |
|
sbalk
Starting Member
2 Posts |
Posted - 2010-02-10 : 22:09:52
|
| I would like to remove the domane from a email address.ABCD@1234.com what I need is ABCDThanks. |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-02-10 : 22:16:26
|
[code]select left(email_addr, charindex('@', email_addr + '@') - 1)from yourtable[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-11 : 00:14:19
|
| [code]select stuff(email_addr,CHARINDEX('@',email_addr),LEN(email_addr),'') FROM Table[/code]------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2010-02-11 : 00:27:17
|
| select SUBSTRING('ABCD@1234.com',0,charindex('@','ABCD@1234.com',0))Senthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceledhttp://senthilnagore.blogspot.com/ |
 |
|
|
sbalk
Starting Member
2 Posts |
Posted - 2010-02-12 : 08:39:46
|
| Thanks all with your help I was able to make it work.have a great day. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-12 : 08:41:11
|
welcome ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|