_:nccfca531d4a8412e9a1cd41efb0a536fxb1
<http://schema.org/text>
"Bonjour,\r\n\r\nJe voudrais savoir si il était possible de réaliser une soustraction à partir de résultats d'autre requetes.\r\n\r\nVoici mes requetes:\r\nRequete1:\r\nSELECT ROUND(Sum(expr1),2) AS Expr2\r\nFROM (SELECT Sum(TotalLigneHT) as expr1\r\nFROM BIO_LigneFacture\r\nWHERE (((Year([DateDocument]))=YEAR(now)-2) \r\nAND ((Month([DateDocument]))=1))\r\n\r\nUnion\r\n\r\nSELECT Sum(TotalLigneHT) as expr1\r\nFROM BIO_LigneRecapCaisse\r\nWHERE (((Year([DateDocument]))=YEAR(now)-2) \r\nAND ((Month([DateDocument]))=1))\r\n)  AS [%$##@_Alias];\r\n\r\nRequete2:\r\nSELECT ROUND(Sum(expr1),2) AS Expr2\r\nFROM (SELECT Sum(TotalLigneHT) as expr1\r\nFROM BIO_LigneFacture\r\nWHERE (((Year([DateDocument]))=YEAR(now)-1) \r\nAND ((Month([DateDocument]))=1))\r\n\r\nUnion\r\n\r\nSELECT Sum(TotalLigneHT) as expr1\r\nFROM BIO_LigneRecapCaisse\r\nWHERE (((Year([DateDocument]))=YEAR(now)-1) \r\nAND ((Month([DateDocument]))=1))\r\n)  AS [%$##@_Alias];\r\n\r\n\r\nJe voudrais savoir si il y avait un opérateur tel que UNION pour la soustraction.\r\n\r\nMerci d'avance."
<https://forums.commentcamarche.net/forum/affich-5725247-soustraction-de-resultats-de-deux-requettes>