Bonsoir à tous,

J'ai écris une procédure stockée (voir source ci-dessous) et quand je l'active je trouve 03 enregistrements et seul le dernier contient les bons résultats.
Qq'un pourrait-il m'expliquer le pourquoi de la chose ??

D7, FB 2.0, Zeos 6.

NB: Nouveau sur FB.

Voici le code :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
 
begin
  select sum(MONTANT_2) from ENT_MDT
  into tot_Mdt;
 
  select sum(montant) from Titre
  where compte=2 and avoir=0
  into tot_Titre_d;
  suspend;
 
  select sum(montant) from Titre
  where compte=2 and avoir=1
  into tot_Titre_c;
  suspend;
 
  select sum(montant_2) from ent_ppo
  where type_ppo=1 or type_ppo=2 or type_ppo=3
  into tot_PPO_d;
 
  select sum(montant_2) from ent_ppo
  where type_ppo=0 or type_ppo=4 or type_ppo=5
  into tot_PPO_c;
 
  select sum(montant) from mvt_fonds
  where Cpt_Rec = 2
  into tot_mvt_d;
 
  select sum(montant) from mvt_fonds
  where Cpt_dep = 2
  into tot_mvt_c;
  suspend;
end