NLS_LANGUAGE, NLS_TERRITORY, NLS_CHARACTERSET คืออะไร

Mathurada Ekkapat
1 min readApr 9, 2018

--

NLS_LANGUAGE, NLS_TERRITORY, NLS_CHARACTERSET-- Get NLS_LANGUAGE database parameter for this importing procedure.
BEGIN
SELECT "VALUE"
INTO v_language_db
FROM NLS_DATABASE_PARAMETERS
WHERE PARAMETER = 'NLS_LANGUAGE';
EXCEPTION
WHEN NO_DATA_FOUND THEN
LOG_IMPORT_DEVIATE_HISTORY(
$PLSQL_UNIT,
'No data found while getting NLS_LANGUAGE database
parameters for this importing procedure.'
);
RAISE;
WHEN OTHERS THEN
LOG_IMPORT_DEVIATE_HISTORY(
$$PLSQL_UNIT,
'Throws exception and exit with code:'||SQLCODE
||' message:'||SQLERRM
||' before getting NLS_LANGUAGE database parameters
for this importing procedure.'
);
RAISE;
END;

-- Get NLS_TERRITORY database parameter for this importing procedure.
BEGIN
SELECT "VALUE"
INTO v_territory_db
FROM NLS_DATABASE_PARAMETERS
WHERE PARAMETER = 'NLS_TERRITORY';

EXCEPTION
WHEN NO_DATA_FOUND THEN
LOG_IMPORT_DEVIATE_HISTORY(
$$PLSQL_UNIT,
'No data found while getting NLS_TERRITORY database
parameters for this importing procedure.'
);
RAISE;
WHEN OTHERS THEN
LOG_IMPORT_DEVIATE_HISTORY(
$$PLSQL_UNIT,
'Throws exception and exit with code:'||SQLCODE
||' message:'||SQLERRM
||' before getting NLS_TERRITORY database parameters
for this importing procedure.'
);
RAISE;
END;

-- Get NLS_CHARACTERSET database parameter for this importing procedure.
BEGIN
SELECT "VALUE"
INTO v_charset_db
FROM NLS_DATABASE_PARAMETERS
WHERE PARAMETER = 'NLS_CHARACTERSET';

EXCEPTION
WHEN NO_DATA_FOUND THEN
LOG_IMPORT_DEVIATE_HISTORY(
$$PLSQL_UNIT,
'No data found while getting NLS_CHARACTERSET database
parameters for this importing procedure.'
);
RAISE;
WHEN OTHERS THEN
LOG_IMPORT_DEVIATE_HISTORY(
$$PLSQL_UNIT,
'Throws exception and exit with code:'||SQLCODE
||' message:'||SQLERRM
||' before getting NLS_CHARACTERSET database parameters
for this importing procedure.
');
RAISE;
END;

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response