Skip to Main Content

SQL & PL/SQL

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

DBMS_OUTPUT.PUT_LINE format: how to lineup all values

591556Sep 20 2007 — edited Sep 23 2007
I have the code below:
DBMS_OUTPUT.PUT_LINE(‘ID LAST_NAME FIRST_NAME ANNUAL_SALARY TAX’);
DBMS_OUTPUT.PUT_LINE(‘__ _________ __________ _____________ ___’);

these 2 lines of printout worked ok. then I use a loop to display all values:
DBMS_OUTPUT.PUT_LINE(r_emp.id || ' ' || r_emp.last_name || ' ' ||
r_emp.first_name || ' ' || v_an_sal || ' ' || v_tax);

the values displayed in the loop are in a mess:
ID LAST_NAME FIRST_NAME ANNUAL_SALARY TAX
__ _________ __________ _____________ ___
1 Velasquez Carmen 30000 4350
2 Ngao LaDoris 17400 1710
3 Nagayama Midori 16800 1620
9 Catchpole Antoinette 15600 1440
10 Havel Marta 15684 1452.6

can someone please help me to line up all these vlaues along with the column names? thanks in advance

Message was edited by:
user588553
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 21 2007
Added on Sep 20 2007
4 comments
6,175 views