Well, here's the first thing he came up with. It shows all the orphaned waypoints in the database.
Code:
select a.*
from grid_entries a
left outer join grid b on a.zoneid = b.zoneid and a.gridid = b.id
where
b.zoneid is null
order by
zoneid, gridid, number
I got 231 orphaned records in the ax_peq18d database.
I'll have to see what else he came up with during the day while I was at work.