DBMS_OUTPUT.PUT_LINE column output
876003Jul 17 2011 — edited Jul 17 2011Hello All,
I want to print out 3 columns from a table, First name, Last name and Age using a for loop in pl/sql code.
As some names contain more letters than other, the DBMS_OUTPUT.PUT_LINE output looks like this,
DBMS_OUTPUT.PUT_LINE(‘First Name Last Name Age’);
DBMS_OUTPUT.PUT_LINE();
DBMS_OUTPUT.PUT_LINE (v_fname.firstname || ' ' || v_lname.lastname || ' ' || v_age.age);
First Name Last Name Age
John Smith 32
William Dave 40
What I want is for it to print out the out put line this:
First Name-----------------------------------Last Name---------------------------Age
John-------------------------------------------Smith----------------------------------32
William-----------------------------------------Dave----------------------------------40
of course without the lines I did this to show what i mean as this doesn't support tap.
Can someone please help me with this?