Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
Tags
- 줄바꿈 문자
- IntelliJ
- 네트워크
- bash
- maVen
- Windows
- profile
- find
- ssh
- lsof
- context
- resource
- plugin
- Source
- web.xml
- 단축키
- vscode
- Windows 10
- VirtualBox
- import
- netsh
- Eclipse
- tomcat
- port
- Quartz
- grep
- Mac
- JavaScript
- GIT
- xargs
Archives
- Today
- Total
develog
format number 본문
DECLARE
FUNCTION FN_FORMAT_SCORE(P_SCORE NUMBER)
RETURN VARCHAR2
IS
V_SCORE VARCHAR2(20);
BEGIN
V_SCORE := NVL(P_SCORE, 0);
V_SCORE := TRIM(TO_CHAR(V_SCORE, '9,990.9'));
RETURN V_SCORE;
EXCEPTION
WHEN OTHERS
THEN
RETURN TO_CHAR(NVL(P_SCORE, 0));
END FN_FORMAT_SCORE;
BEGIN
DBMS_OUTPUT.PUT_LINE(FN_FORMAT_SCORE(NULL));
DBMS_OUTPUT.PUT_LINE(FN_FORMAT_SCORE('0'));
DBMS_OUTPUT.PUT_LINE(FN_FORMAT_SCORE(0));
DBMS_OUTPUT.PUT_LINE(FN_FORMAT_SCORE(100));
DBMS_OUTPUT.PUT_LINE(FN_FORMAT_SCORE(1000));
DBMS_OUTPUT.PUT_LINE(FN_FORMAT_SCORE(1000.9));
DBMS_OUTPUT.PUT_LINE(FN_FORMAT_SCORE(1007.9));
END;
Comments