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 |
|
chad
Starting Member
11 Posts |
Posted - 2005-11-30 : 09:15:01
|
| Can anyone help me out? I'm trying to return everthing to the left of the '@' in email addresses.thanks!! |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2005-11-30 : 09:15:21
|
| select left(@email, charindex('@', @email) -1)-----------------[KH] |
 |
|
|
chad
Starting Member
11 Posts |
Posted - 2005-11-30 : 09:24:17
|
| khtan, thanks.I just tried the below and received: "SQL script containing the text '@' cannot be processed."select left(@epemail, charindex('@', @epemail) -1) from veperson select left(@epemail, charindex('@', epemail) -1) from veperson |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-11-30 : 09:34:10
|
| Is this working?select left(@epemail, charindex('@', epemail) -1) from veperson MadhivananFailing to plan is Planning to fail |
 |
|
|
chad
Starting Member
11 Posts |
Posted - 2005-11-30 : 09:56:15
|
| I can't get it to work. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-11-30 : 09:59:33
|
| Declare @sql varchar(100)set @sql='test@test.com'select left(@sql,charindex('@',@sql)-1)MadhivananFailing to plan is Planning to fail |
 |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2005-11-30 : 11:11:18
|
| >>I just tried the below and received: "SQL script containing the text '@' cannot be processed."Where/how are you testing this? what is generating that error message? |
 |
|
|
|
|
|
|
|