« Default Alarm Lead Time | Main | Date Stamp your Group »

SQL Query for Secondary Contacts & their Email Addresses

Here's a SQL Query request that comes up often...  How to find all secondary contact and their email addresses:

Here ya' go!

select contact1.company, contsupp.contact, contsupp2.contsupref + contsupp2.address1 from contact1, contsupp, contsupp as contsupp2 where contsupp.rectype = 'C' and contact1.accountno = contsupp.accountno and contsupp.recid = contsupp2.linkacct order by contact1.company

Now wouldn't the GoldMine Guide To SQL Queries (http://www.thegmblog.com/sql4gm/) make a great Holiday gift for that special GoldMiner in your life?

Comments (2)

Nice Query ! Helped me clean OUT some Additional Contacts.

FWIW - the query returned all the Referral Records as well as the Additional Contacts.

Thanks !

Chad Smith:

Good catch --- I updated the query to only bring up secondary contacts.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About

This page contains a single entry from the blog posted on December 18, 2006 8:10 PM.

The previous post in this blog was Default Alarm Lead Time.

The next post in this blog is Date Stamp your Group.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.34