RE: How do I capture text after @ sign

RE: How do I capture text after @ sign

 

  

right(email, len(email) - charindex('@',email))

-----Original Message-----
From: Lindeman Luanne
[mailto:mssqldba-ezmlmshield-x16821599.[Email address protected]
Sent: Thursday, December 28, 2006 10:09 AM
To: LazyDBA Discussion
Subject: How do I capture text after @ sign


Hi,

I need to return all the unique email domains from a table of users.
How would I select from a column containing email addresses so that it
returns only the unique text after the @ sign (since @ sign isn't always
at the same location in the text string)?

Thanks.

Luanne



---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html


MS Sql Server LazyDBA home page