12.07.2015 Views

Oracle SQL Developer

Oracle SQL Developer

Oracle SQL Developer

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Setting up the Globalization Support EnvironmentExample 11–2NLS_LANGUAGE=GERMANALTER SESSION SET NLS_LANGUAGE=German;SELECT last_name, hire_date, ROUND(salary/8,2) salary FROM employeesWHERE employee_id IN (111, 112, 113);You should see results similar to the following:LAST_NAME HIRE_DATE SALARY------------------------- --------- ----------Sciarra 30-SEP-97 962.5Urman 07-MRZ-98 975Popp 07-DEZ-99 862.5Note that the language of the month abbreviations has changed to German.11.2.3.2 NLS_TERRITORYThe NLS_TERRITORY parameter can be set to any valid territory name and the defaultis derived from the NLS_LANG setting. NLS_TERRITORY specifies the conventions forthe following default date and numeric formatting characteristics:■■■■See Also:■■Date format<strong>Oracle</strong> Database installation guides for information on thesupported languages in the <strong>Oracle</strong> Database.<strong>Oracle</strong> Database Globalization Support Guide for more informationon supported languages.Decimal character and group separatorLocal currency symbolISO currency symbol■ Dual currency symbolThe territory can be modified dynamically during the session by specifying the newNLS_TERRITORY value in an ALTER SESSION statement. For example, to change theterritory to France during a session, issue the following ALTER SESSION statement:ALTER SESSION SET NLS_TERRITORY = France;Modifying NLS_TERRITORY resets all derived NLS session parameters to defaultvalues for the new territory. Example 11–3 and Example 11–4 show behavior thatresults from different settings of NLS_TERRITORY and NLS_LANGUAGE.Example 11–3NLS_LANGUAGE=AMERICAN, NLS_TERRITORY=AMERICA-- set NLS_LANAGUAGE and NLS_TERRITORYALTER SESSION SET NLS_LANGUAGE = American NLS_TERRITORY = America;-- enter the following SELECT to view the format of the output for currencySELECT TO_CHAR(salary,'L99G999D99') salary FROM employeesWHERE employee_id IN (100, 101, 102);When NLS_TERRITORY is set to AMERICA and NLS_LANGUAGE is set to AMERICAN,results similar to the following should appear:SALARY11-6 <strong>SQL</strong> <strong>Developer</strong> Online Help

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!