Try this:
selectemails.email as emailAddress
,reverse(substring(reverse(emails.email), 1, charindex('.', reverse(emails.email)) - 1)) as emailDomain
from(
select'xxx.yyy@xxx.com' as email
union all
select'xxx.yyy@xxx.co.uk'
) emails
ML
---
Matija Lah, SQL Server MVP
http://milambda.blogspot.com