Lists all citations in the database from which citations of non-existent sources (‘phantoms’) and citations for non-existent events or persons (‘headless’) can be found, along with other useful information such as all citations per source.
The query builds a temporary table with index which it then queries with a filter to suppress duplicate reports of citations against Alternate Names. While the query could be made without a temporary table, it would run exponentially more slowly with larger databases without invoking measures that are deprecated by SQLite documentation and incompatible with SQLite versions < 3.6.3. The intermediate table overcomes this problem and may be used for additional queries that will execute very quickly.
Update 21-Jan-2021: Revised code by Pat Jones using common table expressions
Version for RM7 and below AllCitations-RM7.sql tested 2021-01-20
Version for RM8 and above AllCitations-RM8.sql tested 2021-01-20
Old version AllCitations.sql Revised 2011-11-04
|Screenshot from SQLiteSpy|