Bonjour,

Je vous pose mon problème car je n'y arrive pas
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
33
34
35
36
	   FOR recFlxAirprice in (
								SELECT faretarifnumber, codeorigine, codedestination, codecompagnie,
								       farebasis, prixpublic_al, prixpublic_al_rt, codemonnaie,
								       datedebutvalidite, ft_first_ticketing_date, ft_last_ticketing_date,
								       footnote, route
								  FROM surcouf.flx_airprice
								 WHERE dateduflux = (SELECT MIN (dateduflux)
								                       FROM flx_airprice)
								INTERSECT
								SELECT faretarifnumber, codeorigine, codedestination, codecompagnie,
								       farebasis, prixpublic_al, prixpublic_al_rt, codemonnaie,
								       datedebutvalidite, ft_first_ticketing_date, ft_last_ticketing_date,
								       footnote, route
								  FROM surcouf.flx_airprice
								 WHERE dateduflux = (SELECT MAX (dateduflux)
								                       FROM flx_airprice)									 
								)
	   LOOP
 
	   	   Update surcouf.flx_airprice
		   SET etat = 10
		   WHERE faretarifnumber = recflxairprice.faretarifnumber
			   AND codeorigine = recflxairprice.codeorigine
			   AND codedestination = recflxairprice.codedestination
			   AND codecompagnie = recflxairprice.codecompagnie
			   AND farebasis = recflxairprice.farebasis
			   AND prixpublic_al = recflxairprice.prixpublic_al
			   AND prixpublic_al_rt = recflxairprice.prixpublic_al_rt
			   AND codemonnaie = recflxairprice.codemonnaie
			   AND datedebutvalidite = recflxairprice.datedebutvalidite
			   AND ft_first_ticketing_date = recflxairprice.ft_first_ticketing_date
			   AND ft_last_ticketing_date = recflxairprice.ft_last_ticketing_date
			   AND footnote  = recflxairprice.footnote
			   AND route = recflxairprice.route
			   AND dateduflux = date_new_flux;
	   END LOOP;
Le problème c'est ce que cela ne met pas à jour toutes les ligne sur lequelles je boucle
et je n'ai pas de clé primaire dans la table et dans ma boucle je ne peux pas mettre rowid car sinon l'intersect ne marche pas .

merci d'avance