-
how to store leading zeros in an integer field
Is there a way to store leading zeros in an integer field. I cannot change field name to a char field at this stage due to the external application restriction.
At present 051 is stored as 51
Thanks in advance
-
You can't, you can pad left 0s when you select from the table.
-
how to store leading 0's in a number
Oracle doesnot allow to store leading 0's in the number. To overcome this problem, we can use SQL*plus environment command to see the same.
example
SQL> column sal format 09999.99
sql> select sal from emp;
-
how to store leading 0's in a number
SQL> column sal format 09999.99
SQL> select sal from emp;
-
if you can... change the datatype
use an expression to change the datatype to varchar2 and use the lpad or rpad functionality
-
sorry for the previous reply. obvoiusly not what you can do.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|