Try this:
> Select EMail=ISNULL(Email, Login + '@' + d.MailDomain),
> FullName=convert(varchar,sa.FirstName + ' ' + sa.LastName)
> From MasterAccounts ma, SubAccounts sa, Groups g, Domains d, AccountTypes
at1
> Where ma.CustomerID = sa.CustomerID
> AND (ma.Active=0 OR sa.Active=0)
> AND g.DomainID = d.DomainID
> AND ma.GroupID = g.GroupID
> AND at1.AccountType = sa.AccountType
> AND at1.ExternalSystemID = x
where is the ESID configured in Mailsite. It will prevent service
types not associated with MailSite to be excluded (smaller list).
> Also, after running this script, I see the username and domain,
> but occasionally through the list I get an @domain.com without a user.
> Any ideas?
This is because you have users w/out a login. You can either
exclude those (AND Login is not null) or use ISNULL() to
pull the email in.
Dale E. Reed Jr. Emerald and RadiusNT
__________________________________________
IEA Software, Inc. www.iea-software.com
For more information about this list (including removal) go to:
http://www.iea-software.com/support/maillists/liststart