Unused Database Column

In the course of evolving an application, it is not uncommon for database columns to be added in anticipation of some change that never happens or for once used column to be replaced by other schema or even for whole tables to be abandoned because the functionality they supported is no longer needed or relevant. These columns present no actual harm, but may be confusing since one assumes they are used, especially since they may contain legacy data from when they were used.

This report starts with a particular database and examines all of the columns of all of the tables and looks for references in compile units. If there are more than a specified number of references, the column is skipped. If there are no references or less than the specified number, the column is reported. In the sample report, a limit of 1 is used on the theory that a column which is only referenced once may not be useful

The ABL report and sample output are provided. The UnusedDB_James is from James Palmer.


AttachmentSize
UnusedDB.p1.42 KB
UnusedDB.txt38.58 KB
UnusedDB_James.txt63.31 KB