access database

  • Thread starter Thread starter geoff.batterham
  • Start date Start date
G

geoff.batterham

Hi Guys,

I have been thrown into this so please forgive me.

I have a table called Users. This table contains the following fields:

SMTPAddress, Firstname, Lastname, etc....

I have created multiple queries that perform searches on the
SMTPAddress field.
I now would like to create a query that will count the total number of
rows of one type of email address.

i.e.

*@*.department.company.country

I would like to be able to get the # of users with each type of email
address.

any help would be greatly appreciated.

g...
 
Dear G:

You could do this at various levels of complexity. The simplest might be a
wildcard search using:

*@*.*.*.*

That would mean finding those with an @ and followed by 3 periods, with
anything between them.

If you have a list of Countries, you could limit it to those with something
in that list. Same for Companies, even for departments within countries.
This would get increasingly complex.

Perhaps you should try the simplest form first and see what enhancements are
needed.

Tom Ellison
 
SELECT Mid([SMTP],Instr(1,[SMTP],"@")) as Domain
, Count(*) as CountThem
FROM Users
GROUP BY Mid([SMTP],Instr(1,[SMTP],"@"))
 
Back
Top