I have a function that I am using to insert values in to my DB. Here is the relevant part of my insert function:
BEGIN
....
INSERT INTO TABLE1 (AMOUNT)
VALUES (pAmount);
……
So this statement works fine, but if pAmount = 531.42, it inserts 531 to my DB. So it does not take into consideration anything after the decimal point. Fyi, I have also tried:
VALUES (to_char(pAmount, '99,999.99'));
And this also cancels the decimal. Is there a quick fix to this?
What is the datatype of the column? If it is NUMBER(10,0) for example then that means 10 digits max, 0 decimal places. You would want NUMBER(10,2) to allows for 2 decimal places for example.