Create or replace trigger auth_secure
Before insert or update or delete --/triggered before update of the whole table
On g002
Begin
If to_char (sysdate, 'dy ', 'nls _ date_language = American ')
In ('thu') then
Raise_application_error (-20001, 'ou dont have access to modify this table .');
End if;
End;
After compilation, the error message is:
5 pls-00103: the sign "" appears when you need the following: Begin case declare exit for goto if loop mod null Pragma raise return select update while...
8 pls-00103: the sign "" appears when you need the following: Begin case declare else elseif end exit for goto if loop mod null Pragma raise return select update while...
Cause analysis:
Invisible to the naked eye. It may be a space with full width.
Create or replace trigger auth_secure
Before insert or update or delete --/triggered before update of the whole table
On g002
Begin
If to_char (sysdate, 'dy ', 'nls _ date_language = American') -- The front may be a space with a full width.
In ('thu') then
Raise_application_error (-20001, 'ou dont have access to modify this table .');
End if; -- the front may be a space with a full width.
End;
Before this line of code, if to_char (sysdate, 'dy ', 'nls _ date_language = American ')
There are two invisible controllers (seemingly spaces, actually encoded as A1, decimal 161), which causes compilation errors.
In the same statement, end if; there are two preceding statements.
Compile OK after deletion
I don't know where to copy it.
Solution:
Because the code is copied elsewhere and may contain invalid characters, you can delete it and write it again!