Bonjour,
J'ai la requête suivante :
>> Pour info la jointure "and a.perpai = b.perpai" est juste présente à des fins d'optimisation.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 select a.matric, b.codrub, b.monsal from hr.zx8k b, hr.zx00 a where a.nudoss = b.nudoss and a.perpai = b.perpai and b.codrub = 'MJL' and a.perpai = 'MT202011' and a.matric = '12345';
Pour le matcle = '12345", il n'y a pas de résultat à raison.
Je voudrais dans cette hypothèse avoir un résultat égal à 0 :
MATCLE CODRUB MONTAN
12345 MJL 0
J'ai essayé ceci :
mais cela ne fonctionne pas.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 select a.matric, b.monsal from hr.zx00 a left join hr.ZX8K b on b.nudoss = a.nudoss --and a.perpai = b.perpai and b.codrub = 'MJL' and a.perpai = 'MT202011' and a.matric = '12345' order by a.matric;
Des idées ?
Merci beaucoup.
Partager