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: 65150
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: Exception handler
Next Topic: Data not found
Goto Forum:

Current Time: Mon Aug 21 14:52:08 CDT 2017

Total time taken to generate the page: 0.07056 seconds