quelle instruction faut il utiliser dans le trigger jouant le rôle que distinct
Bonjour,
j'ai besoin d'utiliser le distinct dans mon trigger mais cela ne marche pas. Ya -il autre chose qui puisse marcher. J'ai aussi essaye le unique lui aussi ne fonctionne pas.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| CREATE OR REPLACE TRIGGER insert_table1
before INSERT ON table1 FOR each row
declare
begin
INSERT INTO attestcmp (............ ) SELECT distinct r.tab_y, r.tab_b, r.tab_s, r.tab_n, r.tab_d, s.tab_r_s, s.tab_r_n, s.tab_r_d, s.tab_r_cons, i.tab_hs_c||i.tab_hsp_c AS tar
FROM table1 r, sadg s, sadi i
WHERE r.ky = s.ky AND
r.kc = s.kc AND
r.kd = s.kd AND
r.kn = s.kn AND
r.ky = i.ky AND
r.kc = i.kc AND
r.kd = i.kd AND
r.kn = i.kn AND
i.tab_hs_c||i.tab_hsp_c= '239100'; |