syntaxe pr tester les corespondances entre occurence tables
Bonjour , ( verssion :DB 9i Forms 10g Toad 9)
j'ai un problème pour tester si des table ont des correspondances dans une autre table sr ma fenêtre(service maintenance)
le code est sur forms mais le probleme est d'ordre syntaxique.
j'arrive pas a trouver la bonne syntaxe pour le dernier test
LES TABLES: PRESTATION VEHICULE >prest_veh** HUILE_PRESTATION VEH >huile_prest** PIECE_PRESTATION_VEHICULE> piece_prest**
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| DECLARE
v_invalid boolean;
cursor c_d is select V.DES_PREST
from PRESTATION V
where V.NUM_PREST=:PREST_VEH.NUM_PREST;
begin
open c_d ;
v_invalid:=c_d%notfound;.
IF v_invalid then null;------------------------------------ (1ER TEST.
else
fetch c_d into :PREST_VEH.PRESTATION; ---(champ prestation du vehicule)
end if;
end;
begin
select H.DES_HUIL,HP.QT_HP
INTO
:PREST_VEH.HUILE,
:PREST_VEH.QTE_H
FROM HUILE_PREST HP,HUILE H
WHERE
H.CODE_HUIL=HP.NUM_HL
AND HP.NUM_COMPM=:PREST_VEH.NUM_COMPM
AND HP.N_CHASS=:PREST_VEH.N_CHASS
AND HP.NUM_PREST=:PREST_VEH.NUM_PREST;
EXCEPTION
WHEN NO_DATA_FOUND ----------------------(2EM TEST...........
THEN NULL;
end;
begin IF EXIST (SELECT num_compm <----------------------(3EM Test c'est la que je bloque???
from piec_prest where
num_compm=:prest_veh.num_compm
and n_chass=:prest_veh.n_chass) then
INSTRUCTION....{select into...
end; |
**********************************************FIN
MERCI ENCORE