Monetary Parameters

Previous
Previous
Next
Next

Oracle Database XE enables you to define radix symbols and thousands separators by locales. For example, in the US, the decimal point is a period (.), while it is a comma (,) in France. Because $1,234 has different meanings in different countries, it is important to display the amount appropriately by locale.

This section contains the following topics:

Currency Formats

Different currency formats are used throughout the world. Some typical formats are shown in Table: Currency Format Examples.

Currency Format Examples

Country Example

Estonia

1 234,56 kr

Germany

1.234,56

China

¥1,234.56

UK

£1,234.56

US

$1,234.56


NLS_CURRENCY Parameter

The NLS_CURRENCY parameter specifies the character string returned by the L number format model, the local currency symbol. Setting NLS_CURRENCY overrides the default setting defined implicitly by NLS_TERRITORY. The value can be any valid currency symbol string, as shown in Example: Displaying the Local Currency Symbol.

Displaying the Local Currency Symbol

-- select and format the salary column from employees
SELECT TO_CHAR(salary, 'L099G999D99') "salary" FROM employees 
  WHERE salary > 11000;

The output from the example should be similar to the following:


SALARY
---------------------
          $024,000.00
          $017,000.00
          $017,000.00
          $012,000.00
          $014,000.00
          $013,500.00
          $012,000.00
          $011,500.00
          $013,000.00
          $012,000.00

NLS_ISO_CURRENCY Parameter

The NLS_ISO_CURRENCY parameter specifies the character string returned by the C number format model, the ISO currency symbol. Setting NLS_ISO_CURRENCY overrides the default value defined implicitly by NLS_TERRITORY. The value can be any valid string.

Local currency symbols can be ambiguous. For example, a dollar sign ($) can refer to U.S. dollars or Australian dollars. ISO specifications define unique currency symbols for specific territories or countries. For example, the ISO currency symbol for the U.S. dollar is USD. The ISO currency symbol for the Australian dollar is AUD.

The NLS_ISO_CURRENCY parameter has the same syntax as the NLS_TERRITORY parameter, and all supported territories are valid values.

To specify the ISO currency symbol for France, set NLS_ISO_CURRENCY as shown in Example: Setting NLS_ISO_CURRENCY=FRANCE.

Setting NLS_ISO_CURRENCY=FRANCE

-- set NLS_ISO_CURRENCY to France
ALTER SESSION SET NLS_ISO_CURRENCY = FRANCE;

-- display the salary of selected employees
SELECT TO_CHAR(salary, 'C099G999D99') "Salary" FROM employees
  WHERE department_id = 60;

The output from the example should be similar to the following:


Salary
--------------------
       EUR009,000.00
       EUR006,000.00
       EUR004,800.00
       EUR004,800.00
       EUR004,200.00

NLS_DUAL_CURRENCY Parameter

Use the NLS_DUAL_CURRENCY parameter to override the default dual currency symbol defined implicitly by NLS_TERRITORY. The value can be any valid symbol.

NLS_DUAL_CURRENCY was introduced to support the euro currency symbol during the euro transition period.