Folks,
I have a existing stored procedure that I\'m trying to update to always show two decimal places even when it\'s a whole number or single decimal number.
You actually, have to insert the data with formatting. (Assuming the targeted column is VARCHAR
) What ever format you fetch and put into a NUMBER
variable, will be a NUMBER
.
A number doesn't have a format to be saved after-all. Only for display, the formatting comes into picture.
insert into SQL_TXT values (TO_CHAR(v_credit_amt,'FM99999.00'));
commit;
If the INSERT-ed column is NUMBER
again.
You still want to go with
SELECT TO_CHAR(COL1,'FM99999.00') FROM SQL_TEXT;