1 2 3 4 5 6
|
Create procedure rechercherDossier(passepartout varchar(25))
Begin
Select d.*,a.CodeAgent,a.NomAgent,a.PrenomAgent,c.CodeClient ,c.NomClient,c.PrenomClient,p.LibelleProces,p.NumRegion,r.NomRegion, sum(MontantDemande) as montantDemande,sum(MontantRecommande) as montantRecommande,sum(MontantAccorde) as montantAccorde from dossier d,agent a,client c,proces p ,region r where d.Mle = a.Mle and d.NumCompte = c. NumCompte and d.NumProces = p. NumProces and p.NumRegion = r.NumRegion and p.LibelleProces = passepartout or d.Mle= a.Mle and d.NumCompte = c. NumCompte and d.NumProces = p.NumProces and p.NumRegion = r.NumRegion and c.CodeClient = passepartout or d.Mle = a.Mle and d.NumCompte = c.NumCompte and d.NumProces = p.NumProces and p.NumRegion = r.NumRegion and a.CodeAgent = passepartout;
End |
Partager