We have an issue in storing data into columns with datatype number and exceeds a length of 16. In our database the creditcardnumber is number(22). When we store numbers with length beyond 15 digits it changes to the exponential format. eg if the credit card number is 2222222222222222 the storage is like 2.22222222222222E15. When we retrieve based on the credit card number there is no matching records found. We would like to know how we can store numbers in columns whose length exceeds number(15) . In our system as per the standards all Id columns are number(38) . We might face the same problem even while storing the id.
Sree, I would suggest storing the credit card number as varchar(16). Where did the 22 come from anyway? I thought credit cards numbers were 16 characters?
I favor using varchar over number because a credit card number is really a series of characters that happen to all be digits. You can't perform numerical operations, like addition, on credit card numbers.
For the id, it may be valid to use a number. Note that the display in exponential form doesn't necessarily preclude a higher precision value from being stored.