As of 126.96.36.199, RootsMagic does not provide a comprehensive report on how each entry in the Address List is used – is it merely a Contact or is it the address of a Person or Family (couple) in the tree database? This query provides a list which helps answer that need.
RM does provide a comprehensive report on how each Repository is used by Sources, To Do tasks and Correspondence. Because Repository addresses are stored in the same table as Contact, Person and Family addresses, this query includes summary information on the usage of all addresses.
The query results are laid out with the basic address information in the left columns and the usage report in the two right-hand columns, User type and Used by. The basic address data includes Name, Street, Place, Primary. Place is the reverse concatenation of City, State, Country which affords a convenient geopolitical sort when ordered alphabetically. Primary indicates whether the address is Primary (Y) or Secondary (N), applicable only to Repositories.
The query has been tested on SQLiteSpy with the dummy RMNOCASE extension.
AddressHowUsed-RM7.sql rev 2021-07-03 for cleaner results for Contacts. Incompatible with RM8