-
getting the distinct values to the RIGHT of the “@”
have a table of 750,000 records
I’d like to get a distinct listing of domain for this table. However, I do not isolate the domain name of an email address as its own field
I need an SQL statement that will SELECT Distinct off of my email field, getting the distinct values to the RIGHT of the “@”
-
Try this
select distinct substring(emailcolumn,charindex('@',emailcolumn),d ata_length(emailcolumn)-charindex('@',emailcolumn)-1)
from yourtable
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|