yeah, your missing it a bit.
there is no need to use the multiple joins, not using multiple loins is how you do n levels.
use a group by clause on the CategoryParent
and create the hierarchy by looping through the records in the recordset.
you may need to order by the CategoryParent as well, and add logic that will save the CategoryParent in a variable, then the next time through compare the current record CategoryParent to the one in the variable and only write it if it is different.
If you need us to help you create this, I would suggest signing up for a premiere support appointment.