|
-
It would not work..........
SQL> create table test(no varchar2(20));
Table created.
SQL> create table test1(no varchar2(20));
Table created.
SQL> set scan off
SQL> create or replace trigger trig_test1234
2 before insert on test1 for each row
3 begin
4 if :new.no='GS&M(D''Ambrosio)' then
5 :new.no:='xxxx';
6 end if;
7 end;
8 /
Trigger created.
SQL> select * from test;
NO
--------------------
GS&M (D'Ambrosio)
SQL> insert into test1 select * from test;
1 row created.
SQL> commit;
Commit complete.
SQL> select * from test1;
NO
--------------------
GS&M (D'Ambro
 Originally Posted by Scorby
Use 2 single quotes together:
IF :NEW.GENERIC_FN IS NULL AND :NEW.FISCGR_SUPVLASTNAME = 'GS&M (D''Ambrosio)' THEN
:NEW.GENERIC_FN := 'Sales & Marketing';
END IF;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|