12.07.2015 Views

Oracle SQL Developer

Oracle SQL Developer

Oracle SQL Developer

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Setting up the Globalization Support EnvironmentSee Also:■■<strong>Oracle</strong> Database installation guides for information on theNLS_LANG environmental variable<strong>Oracle</strong> Database <strong>SQL</strong> Reference for information on the ALTERSESSION statement.11.2.3 Language and Territory ParametersSetting different NLS parameters for local territories allows the database session to usedifferent cultural settings. For example, you can set the euro (EUR) as the primarycurrency and the Japanese yen (JPY) as the secondary currency for a given databasesession even when the territory is defined as AMERICA.This topic contains information about the following parameters:■ NLS_LANGUAGE■ NLS_TERRITORY11.2.3.1 NLS_LANGUAGEThe NLS_LANGUAGE parameter can be set to any valid language name and the defaultis derived from the NLS_LANG setting. NLS_LANGUAGE specifies the defaultconventions for the following session characteristics:■■■Language for server messagesLanguage for day and month names and their abbreviations (specified in the <strong>SQL</strong>functions TO_CHAR and TO_DATE)Symbols for equivalents of AM, PM, AD, and BC.■ Default sorting sequence for character data when ORDER BY is specified. (GROUPBY uses a binary sort unless ORDER BY is specified.)Example 11–1 and Example 11–2 show the results from setting NLS_LANGUAGE todifferent values. In Example 11–1, the ALTER SESSION statement is issued to set NLS_LANGUAGE to Italian.Example 11–1NLS_LANGUAGE=ITALIANALTER SESSION SET NLS_LANGUAGE=Italian;-- enter a SELECT to check the format of the output after the ALTER SESSIONSELECT 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-SET-97 962.5Urman 07-MAR-98 975Popp 07-DIC-99 862.5Note that the month name abbreviations are in Italian.In Example 11–2, the ALTER SESSION statement is issued to change the language toGerman.Working in a Global Environment 11-5

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

Saved successfully!

Ooh no, something went wrong!