I try to order the next codes of the column "codbobn2" (varchar2(7)). If i do the simple
"order by codbobn2 asc" I obtain:
9602915
9703046 --> mother
9703995
9783046 --> child of 9703046
9793046 --> child of 9703046
But I want to order like this, because the codes whose 3rd position <> '0' are
childs of the code whose 3rd position = '0'.
9602915
9703046 --> mother
9783046 --> child of 9703046
9793046 --> child of 9703046
9703995
I thougth to replace the 3er position of all values = '0' and after order, or something
like this but I don't know how can do this?
"order by codbobn2 asc" I obtain:
9602915
9703046 --> mother
9703995
9783046 --> child of 9703046
9793046 --> child of 9703046
But I want to order like this, because the codes whose 3rd position <> '0' are
childs of the code whose 3rd position = '0'.
9602915
9703046 --> mother
9783046 --> child of 9703046
9793046 --> child of 9703046
9703995
I thougth to replace the 3er position of all values = '0' and after order, or something
like this but I don't know how can do this?
Comment