Categories

Follow our news:

Follow canonburysvcs on Twitter Follow Canonbury Services on Facebook Follow Canonbury Services' news by RSS Follow Canonbury Services' news by Atom Follow Canonbury Services' news by email

NEWS & TECH BLOG

Find records with no primary email address

11/06/2013 – in SQL queries

Each 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%'
)

Share