Used DEF template SQL: Difference between revisions

From IMSMA Wiki
Jump to navigation Jump to search
Created page with "This query lists which templates have been used: SELECT fieldreportdesc.fieldreportname, organisation.orgname, fieldreportdesc.`version`, fieldreportdesc.publisheddate, Count(..."
 
No edit summary
Line 1: Line 1:
This query lists which templates have been used:
This query lists which templates have been '''used'''
<pre>
SELECT
SELECT
fieldreportdesc.fieldreportname,
fieldreportdesc.fieldreportname,
Line 16: Line 17:
fieldreportdesc.`version`,
fieldreportdesc.`version`,
fieldreportdesc.publisheddate
fieldreportdesc.publisheddate
 
</pre>
If any of them are inactive then you need to:
If any of them are inactive then you need to:
# Activate them in the Customisation menu;
# Activate them in the Customisation menu;

Revision as of 13:52, 19 June 2014

This query lists which templates have been used

SELECT
fieldreportdesc.fieldreportname,
organisation.orgname,
fieldreportdesc.`version`,
fieldreportdesc.publisheddate,
Count(fieldreport.fieldreport_guid),
fieldreportdesc.isactive
FROM
fieldreport
Inner Join fieldreportdesc ON fieldreportdesc.fieldreportdesc_guid = fieldreport.fieldreportdesc_guid
Inner Join organisation ON organisation.org_guid = fieldreportdesc.org_guid
GROUP BY
fieldreportdesc.fieldreportname,
organisation.orgname,
fieldreportdesc.`version`,
fieldreportdesc.publisheddate

If any of them are inactive then you need to:

  1. Activate them in the Customisation menu;
  2. Open Template Designer;
  3. Drag them in and save as file;
  4. Inactivate them in the Customisation menu;