Eh bien je fais quelque chose comme cela :
ou plus astucieux s'il y a beaucoup de tables:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 select nvl(decode (nb1, nb2, decode (nb1, nb3, 'ok')), 'ko') from (select count(*) nb1 from table1), (select count(*) nb2 from table2), (select count(*) nb3 from table3);
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 select decode (least (nb1, nb2, nb3, ..., nbx), greatest (nb1, nb2, nb3, ..., nbx), 'OK', 'KO') from (select count(*) nb1 from table1), (select count(*) nb2 from table2), (select count(*) nb3 from table3), ... (select count(*) nbx from tablex);
Partager