Bonjour à tous ,
Je voudrais savoir si on peut Simplifier ce code
En groupant les id_phone in et id_phone not in.Code:
1
2
3
4
5
6
7
8 select count(*) from phonebook where (id_phone_type = 1 or id_phone_type = 4) and country_code = 33 and origin = 'test_fixe' and id_phone in (select id_phone from operation where id_operation_type = 3) and id_phone not in (select id_phone from operation where id_operation_type = 8 ) and id_phone in (select id_phone from operation where id_operation_type = 9)
On sait tres bien que le id_operation_type = 3 and id_operation_type = 8 est absude et le id_operation IN (3,8) est l'équivalent du OU.
J'utilise MS SQL serveur 2005.
Merci d'avance.
