Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

LPAD with spaces in APEX

dmcghanAug 11 2006 — edited Aug 12 2006
Hello everyone. I've been having problems using LPAD the way it's described in so many places. I'm just trying to indent a few spaces on the left side some data depending on its LEVEL in a hierarchical tree.

The problem is that I can not get any spaces to appear on the left side - everything lines up together. The following is an example:

SELECT LEVEL, LPAD(' ',2*(LEVEL - 1)) || lname "Employee",
FROM employee
START WITH manager_emp_id IS NULL
CONNECT BY PRIOR emp_id = manager_emp_id;

I've tried to do this all kinds of ways but finally had to settle with a work around using:
LPAD(' ', 2*LEVEL - 1, '.')
But that adds periods which I don't want.

My gut tells me this has something to do with the spaces being read by IE and Firefox as nothing but I don't know what to do about it.

Any help would be much appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 9 2006
Added on Aug 11 2006
3 comments
1,716 views