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

How to identify primary email addresses

20/01/2012 – in SQL queries

It’s easy enough to write a query to find email address records in GoldMine. This simple one does the job:


select * from contsupp where contact='e-mail address'

However, if we want to limit the results to just primary addresses then we also need to look at the flags that are held in the Zip field. A ‘1’ in the second position is the marker that we are looking for and so we can use SQL’s single-character wildcard (an underscore) to find that:


select * from contsupp where contact='e-mail address' and contsupp.zip like '_1__'

Share