I'm getting the following error when creating a trigger
LINE/COL ERROR
-------- -----------------------------------------------------------------
6/1 PL/SQL: Statement ignored
6/9 PLS-00405: subquery not allowed in this context
this is the code of the trigger:
create or replace trigger
tr_logon_xv
AFTER LOGON ON DATABASE
BEGIN
if ora_login_user<> 'USU_XV'
then
null;
else
if 1 in (select 1 from system.cadastro where host = sys_context('USERENV','HOST'))
then
null;
else
insert into SYSTEM.CADASTRO
values( sys_context('USERENV','HOST'), systimestamp);
end if;
end if;
END;
/
Thanks