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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-12-31 : 09:52:50
|
| lisa writes "Does anyone know a way to select from a field, and parse at the same time, but be able to parse based on a certain character? I realize that you can use string functions to accomplish this, however, I am worried about the performance impact of using too many functions in my select statement. I will be creating a view when doing my select and therefore, I am looking for the optimum performance solution. For example, if the field values in the original table are: lisa@inovaware.com tom@ac.com then I would want to select into my first column: lisa tom and in my second column: inovaware.com ac.com" |
|
|
Nazim
A custom title
1408 Posts |
Posted - 2001-12-31 : 10:49:29
|
| select substring(columnname,1,charindex('@',columnname)-1),substring(cloumnname,charindex('@',columnname)+1,len(columnname))from tablenameshould do it |
 |
|
|
|
|
|
|
|