A voir également:
- Soustraction sql
- Sql (+) - Forum Programmation
- Blob sql ✓ - Forum Webmastering
- Récupération serveur sql - Télécharger - Gestion de données
- Soustraction excel anglais - Forum Excel
- Excel soustraction avec condition ✓ - Forum Excel
2 réponses
Giorgiolino
Messages postés
253
Date d'inscription
vendredi 15 mai 2009
Statut
Contributeur
Dernière intervention
2 mars 2015
52
25 mai 2009 à 18:11
25 mai 2009 à 18:11
Bonjour,
essaie ceci
SELECT DISTINCT Espece, Calibre,
Sum(S.Quantite)-Sum(E.Quantite)
from Espece E INNER JOIN Sortie S
ON E.Espece = S.Espec AND E.Calibre = S.Calibre
ou alors ceci
SELECT DISTINCT Espece, Calibre,
Sum(S.Quantite-E.Quantite)
from Espece E INNER JOIN Sortie S
ON E.Espece = S.Espec AND E.Calibre = S.Calibre
essaie ceci
SELECT DISTINCT Espece, Calibre,
Sum(S.Quantite)-Sum(E.Quantite)
from Espece E INNER JOIN Sortie S
ON E.Espece = S.Espec AND E.Calibre = S.Calibre
ou alors ceci
SELECT DISTINCT Espece, Calibre,
Sum(S.Quantite-E.Quantite)
from Espece E INNER JOIN Sortie S
ON E.Espece = S.Espec AND E.Calibre = S.Calibre