Thursday, August 28, 2014

GoldMine : A Few Simple SQL Queries

I wish more folks would use the SQL Query tool in GoldMine. But I think that's mostly because I'm a data geek. I love seeing what's underneath the system, all those extra columns that we never observe from the graphical interface.

At any rate, here are a few simple queries that you can run right now (Tools | SQL Query). These queries will return ALL the columns. But once you get a sense of what's there, it's easy enough to pick out just the columns you want;

A list of all calls completed in the last seven days;

SELECT * FROM CONTHIST

WHERE

ONDATE >= (GETDATE() - 7) AND SRECTYPE = 'C'

A list of all appointments completed in the last thirty days;

SELECT * FROM CONTHIST

WHERE

ONDATE >= (GETDATE() - 30) AND SRECTYPE = 'A'

Just the user, the date and the notes of all appointments completed in the last thirty days;

SELECT USERID, ONDATE, NOTES FROM CONTHIST

WHERE

ONDATE >= (GETDATE() - 30) AND SRECTYPE = 'A'

...and don't forget the all-powerful Right-click | Output To | Excel. Have fun!

1 comment:

Anonymous said...

Intended for a lot of vacation goers world-wide, major gear isn't a for a longer time a challenge. replica dior On account of this creativity in addition to new technology connected with strolleys. Most of these number of small wheels possesses liberated vacation goers including almost nothing previous to. dior outlet On your older relations venturing out with summer months trips to help pilgrim web-sites like Kedarnath or maybe Shirdi Sai Baba, strolleys undoubtedly are a massive blessing. replica chanel Simply just be sure that you acquire true in addition to high class gear, adjust this rice on the chaff to claim. fake watches uk You'll discover an abundance of gear models already in the market, most of premium quality and many connected with definitely awful material. replica watches uk Don’t slip with the attraction on the low-priced gear that's currently being bandied in relation to on-line by means of many low number of trusted web-sites in addition to places. Employ a scary eyes and you should chose the suitable carriers for being ones partners within the summer months breaks which you have also been eager for intended for many weeks at a time.