PADDING IDENTITY COLUMNS/SEQUENCE NUMBERS with ZEROES

PADDING IDENTITY COLUMNS/SEQUENCE NUMBERS with ZEROES

 

  

Hi all,

Is this at all possible or is this a stupid requirement? A customer
wants to have a column that is to auto-generated, that is, DBAs call
them IDENTITY in MSSQL and SEQUENCE in Oracle or DB2 I guess? Well, the
easy part is you can auto-generate the values, but customer wants them
3-char long, that is, 001, 002. Is it possible to achieve this or do I
just format the values as they are displayed on the FORM or as they are
extracted from SQL. Wait a minute, did I just answer my own question
there?

Cheers,


EDWIN ONG UY
\\|//
(o o)
^"^"^"^"^"^oOOo"^(_)^"oOOo^"^"^"^"^"^"^"^"^"^"^

"Choose a job you love, and you will never have to work a day in your
life." --Confucius
"How do I work? I grope." -- Albert Einstein
"Experience is the best teacher, enrolling in the class is the biggest
problem." -- Anonymous


Oracle LazyDBA home page