Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
In a program that dynamically insert / update records in an Oracle DB table. I got 1 problem as described below:
For a record value beginning with '0' (e.g. 062), the value displayed in the Oracle table becomes '62' rather than '062'. The '0' got truncated. How can this be solved? Thanks.
Posted
Comments
[no name] 9-Jul-14 12:15pm    
There is nothing to be solved. The number 062 is exactly the same value as 62.
s yu 9-Jul-14 12:32pm    
Aday: Thanks for your response. Will add additional code to handle it.
Atyant Srivastava 9-Jul-14 13:26pm    
change the datatype to character so it will save the desired value, but in that case you have to do the conversion in case on it is required for calculation.

1 solution

If you insert an numeric or integer value type, you will get this problem.
Try using a char or varchar type.
 
Share this answer
 
Comments
Maciej Los 9-Jul-14 14:58pm    
You hit a 10!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900