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 |
doran_doran
Posting Yak Master
179 Posts |
Posted - 2008-06-05 : 23:25:47
|
Which function should I use so I can get rid of @domain.com . For example,userIDjohn.scribble@quixter.commike.bailey@quixter.combecky.berg@quixter.comI want my result to look likejohn.scribblemike.baileybecky.bergHope it makes sense.Thanks |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-06-06 : 00:09:26
|
Left function. |
 |
|
doran_doran
Posting Yak Master
179 Posts |
Posted - 2008-06-06 : 00:27:18
|
sodeep, left function if wanted to extract number of characters from left. I need a function that will give me everything from the left excep @quixter.com.Hope it makes sense now. see my example in the original post. Thanks |
 |
|
dshelton
Yak Posting Veteran
73 Posts |
Posted - 2008-06-06 : 02:09:58
|
LEFT(field, CHARINDEX('@', field) -1) |
 |
|
doran_doran
Posting Yak Master
179 Posts |
Posted - 2008-06-06 : 07:51:56
|
Thank you very much. I tried following and it worked like I wanted to.select id, email, LEFT(email, CHARINDEX('@', email) -1)from [user] |
 |
|
|
|
|