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: SQL- Left justified with zero maintaining 4 digits of number.

Re: SQL- Left justified with zero maintaining 4 digits of number.

From: Lío <jgonzalezsuareNO_at_SPAMnexo.es>
Date: 1998/09/20
Message-ID: <36054b9d.483669@news.mad.ibernet.es>#1/1

May be I have missed something in your question. At first sight it seems to as simple as:

To_char(id_number, '0999')

You can take the id_number from a sequence or a loop structure and translate it to char with the leading zeroes.

Excuse me if this was not your question.

azhan98_at_tm.net.my wrote in message
<6tsc3d$a9p$1_at_nnrp1.dejanews.com>...
>Hi all,
>
>I have problem again.
>I want to create a number with 4 digits.Using SQL or PL/SQL.
>The number will be in a sequential pattern (as an ID).
>
>The problem is, how can I format the number so that it can be always
>" left justified with 0 (Zero) but maintaining the 4 digit limits ".
>
Received on Sun Sep 20 1998 - 00:00:00 CDT

Original text of this message

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