I mostly get the admincode5 table there are some strange entries in there. There are a few that have codes for geonameid's that dont' have adm5 entries. They mostly seem to be entries that don't go down to adm4. What I'm wondering is why they are even there. Do I need to check that admin4 is empy when joining on the admincode5 table?
Ok, reply to myself.I figured it out. Like you had mentioned previously just join it in (it just has to be an outer join) and and then do the same thing you do for admin1, 2, 3, and 4.