This one works fine in sql server, but you need to test it with ms access.
SELECT RIGHT(emailAddress, CHARINDEX('@', REVERSE(emailAddress))-1) AS
[domainName]
FROM dbo.customers
GROUP BY RIGHT(emailAddress, CHARINDEX('@', REVERSE(emailAddress))-1)
ORDER BY [domainName]
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Sunday, March 16, 2003 9:29 AM
Subject: Access SQL question
> Hi all:
>
> I have an Access 2000 database with an email field in it.
> I would like to have an SQL query that gives me a count of the ISPs
> in the email field.
>
> For example:
>
> take the following records:
> 1. [EMAIL PROTECTED]
> 2. [EMAIL PROTECTED]
> 3. [EMAIL PROTECTED]
> 4. [EMAIL PROTECTED]
> 5. [EMAIL PROTECTED]
>
> I would like a query to give me:
> 1. aol.com 2
> 2. hotmail.com 3
>
> I have tried many ways, but can't get it to work.
> any suggestions?
>
> thanks
>
> Sandy
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4