Wednesday, July 23, 2008

Heat: Too Many Demo Tables

A client asked: When we first installed Heat, we installed the validation tables that come with the demo data. Is there any way to find which validation tables are not being used and can be deleted?

Yes, you can use Crystal Reports to list the unused validation tables and then delete them (of course, create an archive or SQL backup before deleting any tables):

* Create a Crystal Report using the following HEAT Tables:
HEATTbl
HEATFld

* Link the tables as described below:

- Link the TableName field in HEATTbl to the ValTable field in HEATFld
- The join should be a Left Outer Join, and the Link Type equal (=).

* Add the following field to the Detail in the Crystal report
HEATTbl.TableName

* From the Reports Dropdown Menu choose Selection Formulas > Record and create the following Selection Criteria formula:

{HEATTbl.TableType} = "Validation" and
(IsNull ({HEATFld.ValTable}) or {HEATFld.ValTable} ='')

* Sort the Report by HEATTbl.TableName

* Run the report and the unused validation tables should be listed under TableName.

No comments: