Here’s a SQL Query request that I came upon recently…
“I need to see all contacts I had an appointment with, completed appointments, as well as all contacts I have a scheduled appointment with, pending, for a particular date range.”
I could see this being useful for cleaning up activities scheduled, and done, but not completed, as well as for contacts you may want to do some follow up with. Managers wanting to monitor activity will also find this very useful!
So here’s the SQL Query:
select company, contact, phone1, address1, city, state, zip from contact1 where accountno in (select accountno from conthist where ondate >= '12/1/2008' and ondate <= '12/31/2008' and srectype = 'A') or accountno in (select accountno from cal where ondate >= '12/1/2008' and ondate <= '12/31/2008' and rectype = 'A') order by company
You can change the date range to whatever makes sense for you.
Also, you may want to add in an option so it just shows your activities… Change the portion in the two sections where it says “and userid = ‘BILL’” to your userid.
select company, contact, phone1, address1, city, state, zip from contact1 where accountno in (select accountno from conthist where ondate >= '12/1/2008' and ondate <= '12/31/2008' and srectype = 'A' and userid = 'BILL') or accountno in (select accountno from cal where ondate >= '12/1/2008' and ondate <= '12/31/2008' and rectype = 'A' and userid = 'BILL') order by company
To use this, from GoldMine’s main menu choose Lookup | SQL Queries then Copy & Paste the above in the top section then click Query. If you are using GoldMine Premium Edition then Tools | Filters & Groups and then the SQL Query tab.
You’ll see your results. If you find this useful use the ‘Save’ button to reuse this later on. Within the results, you can do a Right-Click | Output To | Excel to save the results, print them, and further analyze!
Pick Up Your Copy Of The GoldMine Guide to SQL Queries Today!