Hi,
As you are adding ' - ' between each node, I found you a simple way of getting the level. Each time you add ' - ' this means you are adding another level. So you need a way to count these additions. You could write a function that counts the number of occurances of a character in a string. On the other hand, a much faster way would be adding the following line to your select clause:
- length(SYS_CONNECT_BY_PATH(o.name, ' -')) - length(SYS_CONNECT_BY_PATH(o.name, '-')) "level"
The first sys_connect_by adds 2 chars to the complete path for each child, the second one adds just one char to the complete path for each child. Subtract the length of these two and you have the number of levels. It counts the parent as one, so if you only have the parent, then the result is one. If you don't want to count the parent, then just substract 1 from to result.
I hope this will help you out, let us know if it does or not. If it doesn't then we'll look for some other solution.
Pilgrim.