Init parameter NLS_NUMERIC_CHARACTERS ignored
Martin1Jan 12 2007 — edited Jan 15 2007Hi,
i want to insert number values via the following stored procedure into a table with a column of datatype VARCHAR2.
PROCEDURE testDecimalSign
IS
vNum NUMBER := 12.34;
BEGIN
INSERT INTO testtable(col_a) VALUES (TO_CHAR(vNum));
COMMIT;
END;
The column col_a of the table testtable has the datatype VARCHAR2(100);
First of all i did the following statement and rebooted the database:
ALTER SYSTEM SET NLS_NUMERIC_CHARACTERS = ".," SCOPE = SPFILE;
Now when i query the table there is '12,34' instead of '12.34' inserted.
But:
When i put an alter session first in the procedure, it works fine!?
PROCEDURE testDecimalSign
IS
vNum NUMBER := 12.34;
BEGIN
EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_NUMERIC_CHARACTERS = ".,"';
INSERT INTO testtable(col_a) VALUES (TO_CHAR(vNum));
END;
Is it possible that the initialization parameter NLS_NUMERIC_CHARACTERS is ignored?
Has somebody an idea of this problem?
Many thanks in advance and best regards
Martin