NEWS & TECH BLOG
Find records with no primary email address
11/06/2013 – in SQL queriesEach contact in GoldMine may have any number of email addresses, and one of those should be marked as being the primary address.
However, as contacts are changed and edited, this may be lost. The original primary address may have been deleted, for instance, without another being promoted in its place.
This query will find all of the records where this is the case:
select
distinct contact1.accountno, company, contact1.contact
from
contact1, contsupp
where
contact1.accountno=contsupp.accountno
and
contsupp.contact='e-mail address'
and
contact1.accountno not in
(
select accountno from contsupp where
contact='e-mail address' and
zip like '_1%'
)