LPAD with spaces in APEX
dmcghanAug 11 2006 — edited Aug 12 2006Hello 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.