Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-01890 NLS error detected

115359Mar 27 2002
Hello,

I have an NLS error message while trying to get a series of sequences. My sequence seems to work fine, but when I try to get multiple sequences at on time, I have the following message:
SQL> select next_location_id from dual;

NEXT_LOCATION_ID
----------------
200001608

SQL> select next_location_id, next_location_id from dual;
select next_location_id, next_location_id from dual
*
ERROR at line 1:
ORA-01890: NLS error detected
ORA-06512: at "CODBA.NEXT_LOCATION_ID", line 4
ORA-06512: at line 1
I have looked into the ORACLE error message documentation, but it does not help me.

ORA-01890 NLS error detected
Cause: An NLS error was detected.
Action: Look for additional error messages and take appropriate action. If there are no additional errors, call Oracle Customer Support.

The procedure I used is very simple:

create or replace function NEXT_LOCATION_ID return number as
l_retour number(9);
begin
if to_char(sysdate, 'YYYY') = '2002' then
select location_id_2002.nextval into l_retour from dual;
elsif to_char(sysdate, 'YYYY') = '2003' then
select location_id_2003.nextval into l_retour from dual;
elsif to_char(sysdate, 'YYYY') = '2004' then
select location_id_2004.nextval into l_retour from dual;
elsif to_char(sysdate, 'YYYY') = '2005' then
select location_id_2005.nextval into l_retour from dual;
else
l_retour := -1;
end if;

return (l_retour);
end;
/

We have the same problhme when we used directly the sequence.

Someboby can help me??

Regards

Vincent ROBINE
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 24 2002
Added on Mar 27 2002
1 comment
2,496 views