[sql]optimisation d'un requete (édité)
quelqu'un peut me dire comment optimiser cetet requete affin qu'il ne compare qu'une seule fois
Code:
1 2 3 4 5 6 7 8 9 10
| SELECT [TBL LAngdurig Zieken].Matricule, [BO TBL Langdurig Zieken].[Official full name],
[BO TBL Langdurig Zieken].[Department(s) / branch(s) NL], [BO TBL Langdurig Zieken].[Seniority date],
[TBL LAngdurig Zieken].[DEBUT MALADIE],
IIf([DEBUT MALADIE]>=CVDate(Day([Seniority date]) & "/" & Month([Seniority date]) & "/" & (Year([Seniority date])+10)),"1","0") AS Anciëniteit,
[TBL LAngdurig Zieken].[Reprise du Travail], [TBL LAngdurig Zieken].Remarques,
[BO TBL Langdurig Zieken].[Company], [BO TBL Langdurig Zieken].[Description]
INTO [TBLAnc<10j]
FROM [TBL LAngdurig Zieken]
INNER JOIN [BO TBL Langdurig Zieken] ON [TBL LAngdurig Zieken].Matricule = [BO TBL Langdurig Zieken].[Employee id]
WHERE (((IIf([DEBUT MALADIE]>=CVDate(Day([Seniority date]) & "/" & Month([Seniority date]) & "/" & (Year([Seniority date])+10)),"1","0"))="1")); |
en gros y a 2 requetes qui redirigent vers une nouvelle table, si le truk en rouge = 0 ca va dans la table <10 si le truk en rouge = 1 alors c redirigé vers >10