Reputation: 739
In the following query i am trying to change decimal marker to a comma
SELECT to_number('12.5678', '99D9999', NLS_NUMERIC_CHARACTERS =', ') FROM dual;
When i execute this query in sqlDeveloper oracle is saying missing right paranthesis. Please note that i have locale(DE, Gemany).
What might be the reason?
Thanks for any suggestions
Upvotes: 2
Views: 554
Reputation: 19315
NLS_NUMERIC_CHARACTERS =', '
should be passed as varchar
select TO_NUMBER('$94 567,00', 'L999G999D00', 'NLS_NUMERIC_CHARACTERS ='', ''') FROM dual;
http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions211.htm#SQLRF06140
Upvotes: 1
Reputation: 174309
In SQL - as opposed to PL/SQL - the third parameter is a string:
SELECT to_number('12.5678', '99D9999', 'NLS_NUMERIC_CHARACTERS ='', ''')
FROM dual;
See also:
http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions191.htm
Upvotes: 5