Now you will also get the partition in which the DN belongs, also it will only show actual DNs.
Please modify the query on the end. Where I've put the 99% you just enter the beginning of your DNs. The % have to stay there because it's a wildcard. If you would like to see all Numbers including all routepattern, just cut of the end "where ndnorpattern like '99%'"
The tweaked query is
run sql n.aardestinationmask, n.dnorpattern, r.name from numplan as n full join routepartition as r on r.pkid = n.fkroutepartition where n.dnorpattern like '99%'