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: question about set statement

Re: question about set statement

From: Markus Stuhlpfarrer <mstuhlpfarrer_at_hollomey.com>
Date: Thu, 23 Aug 2001 12:29:13 GMT
Message-ID: <3B84F6D9.A85DF0FA@hollomey.com>


update tablename set ASN_PULS_CODE = lpad(to_number(ASN_PULS_CODE),3,'0')

or as Xavier suggested:

update tablename set ASN_PULS_CODE = lpad(rtrim(ASN_PULS_CODE),3,'0')

"jAnO!" wrote:

> Markus Stuhlpfarrer <mstuhlpfarrer_at_hollomey.com> schreef in artikel
> <3B84ED5D.2EE74496_at_hollomey.com>...
> > syntax error
> > lpad has 3 parameters for this:
> > select lpad(2,3,'0') from dual
> > this gives: '002'
> >
> > lpad(2,0) gives back an empty string (0 length)
> > lpad(2,3) adds spaces (' 2')
> > lpad(2,3,'0') adds zeroes ('002')
> >
>
> thanks, but this only gives another representation of the data in a select
> statement, i want to set the data.
>
> greetz.
>
> Jan
Received on Thu Aug 23 2001 - 07:29:13 CDT

Original text of this message

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