My Oracle Support Banner

WHEN CURSOR_SHARING IS SET TO FORCE SQL GET ORA-01841 ON 19.19 (Doc ID 3036790.1)

Last updated on JULY 23, 2024

Applies to:

Oracle Database - Enterprise Edition - Version 19.19.0.0.0 and later
Information in this document applies to any platform.

Symptoms

drop table a purge;
drop table b purge;

create table a (
x nvarchar2(1)
);

create table b (
y nvarchar2(1),
z nvarchar2(16)
);

insert into a values ('X');
insert into b values ('X', '2023/01/01');
commit;

alter session set cursor_sharing = force;

select *
from a
left join b
on x = y
where to_date (z, 'YYYY/MM/DD') < sysdate;

ORA-01841: (full) year must be between -4713 and +9999, and not be 0



Changes

 alter session set cursor_sharing=force;

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.