tailieunhanh - Oracle Built−in Packages- P107
Oracle Built−in Packages- P107: Ah, for the good old days of Version of PL /SQL! Life was so simple then. No stored procedures or functions and certainly no packages. You had your set of built−in functions, like SUBSTR and TO_DATE. You had the IF statement and various kinds of loops. With these tools at hand, you built your batch−processing scripts for execution in SQL*Plus, and you coded your triggers in SQL*Forms , and you went home at night content with a good day's work done. | Appendix A What s on the Companion Disk Parameter Description param NLS parameter being set for the session see following list of values value Value of the specified parameter The following session NLS characteristics can be set via this procedure specify the desired one as the value of the param parameter NLS_CALENDAR NLS_CURRENCY NLS_DATE_FORMAT NLS_DATE_LANGUAGE NLS_ISO_CURRENCY NLS_LANGUAGE NLS_NUMERIC_CHARACTERS NLS_SORT NLS_SPECIAL_CHARS NLS_TERRITORY Exceptions The procedure does not raise any exceptions. However if the value parameter represents a format mask which would be double-quoted in the ALTER SESSION command it needs to be enclosed in triple quotes. Otherwise the following Oracle error will be raised ORA-00922 Missing or invalid option. Restrictions Note the following restrictions on calling this procedure SET_NLS cannot be called from triggers. SET_NLS is not allowed in remote sessions. The procedure does not assert a purity level with the RESTRICT_REFERENCES pragma. Examples To change the default date format for the current session as used by the TO_CHAR and TO_DATE functions specify the following BEGIN NLS_DATE_FORMAT YYYY MM DD TO_CHAR SYSDATE END The above PL SQL block produces a result similar to this 1997 07 26 Enclose the NLS parameter name in single quotes if it is passed as a string literal. Another option is to initialize a VARCHAR2 variable to the parameter value and pass the variable name for the param parameter. In this case the variable name is not quoted in the call to SET_NLS. Modifying Session Settings 521 Appendix A What s on the Companion Disk As mentioned previously if the value parameter represents a format mask which would be double-quoted in the ALTER SESSION command it needs to be enclosed in triple quotes. Otherwise the ORA-00092 Oracle error will be raised. WARNING The following sample code and output reveals a problem .
đang nạp các trang xem trước