PL/SQL (MOSC)

MOSC Banner

PLS-00049: bad bind variable with trigger on update in binary_ci field

edited Oct 23, 2019 5:00AM in PL/SQL (MOSC) 1 commentAnswered

Hello everybody, I work in Oracle 18.3, case insensitive collation.

I create two tables, the second using a case insensitive field:

create table t1 ( txt varchar2(10) );

create table t2 ( txt varchar2(10)  COLLATE BINARY_CI);

Trigger on the first one goes right:

alter session set default_collation=USING_NLS_COMP; --(to avoid other errors)

CREATE OR REPLACE TRIGGER TR1

BEFORE INSERT OR UPDATE

ON T1

FOR EACH ROW

BEGIN

If :new.txt is null

then

:new.txt := '2';

end if;

END TR1;

/

Instead, on the table with case insensitive collation, I find:

alter session set default_collation=USING_NLS_COMP; --(to avoid other errors)

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center