Home » RDBMS Server » Server Administration » use of rpad
use of rpad [message #370374] Fri, 10 September 1999 23:13 Go to next message
scott campbell
Messages: 13
Registered: July 1999
Junior Member
I'm building a table comprised of columns from ~15 tables. I want to use utl_file to write the composite table, row by row, to Unix files. The columns coming in need to padded, right justified, with blanks before being written out. Is rpad helpful here or how can I do it? Thanks.
Re: use of rpad [message #370375 is a reply to message #370374] Sun, 12 September 1999 05:37 Go to previous messageGo to next message
Paul
Messages: 164
Registered: April 1999
Senior Member
Scott,
sounds like you would want to use a combination of rtrim and lpad as in:

lpad(rtrim(your_column),nn)

this will first get rid of trailing blanks (right justify) then pad with leading blanks to a total
length of nn.
Re: use of rpad [message #370376 is a reply to message #370375] Sun, 12 September 1999 13:28 Go to previous message
scott campbell
Messages: 13
Registered: July 1999
Junior Member
thanks. works like a charm
Previous Topic: Oracle to SQL Server
Next Topic: Problem calling package from pl/sql program
Goto Forum:
  


Current Time: Thu Mar 28 18:18:58 CDT 2024