SQL> DECLARE
2 lv_format_txt CONSTANT VARCHAR2(11) := '$99,999.99';
3 lv_test_txt VARCHAR2(11);
4 lv_test_num NUMBER := 54321;
5 BEGIN
6 lv_test_txt := TO_CHAR(lv_test_num, lv_format_txt);
7 DBMS_OUTPUT.PUT_LINE('Test Value: ' || lv_test_txt);
8 END;
9 /
Test Value: $54,321.00
PL/SQL procedure successfully completed.
SQL>
SQL>
SQL>