Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: [?] pl/sql string function

Re: [?] pl/sql string function

From: <raffaele.d'alba_at_snamprogetti.eni.it>
Date: 3 Nov 99 13:33:05 GMT
Message-ID: <38203991.0@etsv0008>

"Poguedauff" <pogue_at_pogue.it> wrote:
>I am trying to write an SQL statement that insert in the leftmost part of a
>varchar2 n blanks where n is the length of the field minus the existing
>characters of the field.
>An example:
>
>field name = pippo
>field size = 8 (varchar2)
>field value = 'ABC'
>
>what I want the field value to be is = ' ABC'
>
>Did anybody have the same problem? Any suggestion (specially for inserting n
>blanks , I know how I can calculate the n value withe the length function)?
>
>Thanks in advance to everybody.
>
>
>
>

try substr(lpad(' ',lenght(pippo)) || pippo,-lenght(pippo)) Received on Wed Nov 03 1999 - 07:33:05 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US