Table name: Table1
The table has 2 columns
Id Name
1 1|admin|abs@yahoo.com
2 22|user|aaaaa@yahoo.com
From the Name
column I want to fetch the email adress
Result:
Name
abs@yahoo.com
aaaaa@yahoo.com
Table name: Table1
The table has 2 columns
Id Name
1 1|admin|abs@yahoo.com
2 22|user|aaaaa@yahoo.com
From the Name
column I want to fetch the email adress
Result:
Name
abs@yahoo.com
aaaaa@yahoo.com
try this one
select SUBSTRING(name,CHARINDEX('|',name, CHARINDEX('|', name)+1)+1,100) from Table1