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 out where your linked docs live

11/01/2012 – in SQL queries

Here’s a SQL query that will you show you a count of all the document paths referenced under the Links Tabs in your GoldMine database:


use goldmine

select
substring(address1+address2,1,len(address1+address2)-CHARINDEX('\', reverse(address1+address2))), COUNT(substring(address1+address2,1,len(address1+address2)-CHARINDEX('', reverse(address1+address2))))
from CONTSUPP where RECTYPE='L' or RECTYPE='F'

group by substring(address1+address2,1,len(address1+address2)-CHARINDEX('\', reverse(address1+address2)))
order by substring(address1+address2,1,len(address1+address2)-CHARINDEX('\', reverse(address1+address2)))

The only snag is that you must run this from SQL Management Studio rather than GoldMine for it to work.

Share