Home » SQL & PL/SQL » SQL & PL/SQL » LPAD in select
LPAD in select [message #250346] Mon, 09 July 2007 13:41 Go to next message
Messages: 144
Registered: September 2005
Location: chicago
Senior Member

select remiter_name,check_no  from remit;


datatype of these 2 columns is varchar2(25) and number(9)

But in display i want

**************ABC --- I mean it should pad the name so that the total length becomes 100 including the column value

same with number ************123456789 --- total length here also should be 100,

How can i do this in select.

Re: LPAD in select [message #250347 is a reply to message #250346] Mon, 09 July 2007 13:47 Go to previous message
Michel Cadot
Messages: 63948
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You already posted the solution in your title:
SQL> select lpad(to_char(123),10,'*') n from dual;

1 row selected.

Previous Topic: Passing variables in cursor
Next Topic: what happens to dbms_scheduler.create_job's when import
Goto Forum:

Current Time: Fri Oct 28 09:49:05 CDT 2016

Total time taken to generate the page: 0.09562 seconds