Bonjour,
J'ai une table (bksld) qui contient trois champs (CHAP3, CHAP6 et MONTANT). Je cherche à avoir le résultat suivant :
- Insérer une colonne dans la table bksld
- effectuer la recherche suivante :
- Si [CHAP3]=101 ou si [CHAP3]=102 ou [CHAP3]=251 ET si [MONTANT] <0 alors "Creance"
- Sinon si [CHAP3]=101 ou si [CHAP3]=102 ou [CHAP3]=251 ET si [MONTANT] >0 alors "Dette"
Comment puis je formuler cela en langage SQL?
CHAP3 CHAP6 MONTANT 101 101000 60000 102 102000 -105000 111 111000 100000 251 251000 -75000 303 303100 500000
Partager