Is there a means to extract ALL of the emails from the database? When I export emails currently, the results are only for the primary contact within each record, and I would like to export the email addresses for all contacts in all records
select AccountNo,
Company,
Contact,
Address1,
Address2,
City,
State,
Zip,
Phone1,
(select top 1 contsupref+address1
from contsupp as cs
where cs.accountno = c1.accountno
and contact = 'E-MAIL ADDRESS'
and zip like '_1__'
) as Email
from contact1 as c1
Union select ContSupp.AccountNo,
ContSupp.Contact as Company,
ContSupp.Contact,
ContSupp.Address1,
ContSupp.Address2,
ContSupp.City,
ContSupp.State,
ContSupp.Zip,
ContSupp.Phone,
CS2.ContSupRef+CS2.Address1 AS Email
FROM Contact1, ContSupp, ContSupp CS2
WHERE Contact1.AccountNo=ContSupp.Accountno
and ContSupp.RecID = CS2.LinkAcct
AND ContSupp.RecType='C'
order by Company
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.