sql addition of 2 queries return NULL -
I want to add the sum of the two questions (please see the questions given below, this example works) My problem When a question returns an empty result like
(Select the amount (60 + 3 + 25 + 2)) + (Select the amount (0)) montant In addition, Additionally, the result of the result is automatically the tap.
But when there are more results than the tap of 2 questions: choose
(select amount (60 + 3 + 25 + 2) + + (select amount (300 + 50) ) As the montant works in addition and I get the right result:
Here is the query that gives me 90 as a result
lf.idFraisForfait = f.id on joining the fichefrais FF on the selected amount (lf.quantite) fraisforfait joining the f lignefraisforfait lf ff.idVisiteur = LF .IDVisiteur and ff.mois = lf.mo Is where lf.idVisiteur = "a131" and lf.mois = "201312" This is the second result which gives me 0 results
select Lignefraishorsforfait LFH inner yoga ff.idVisiteur = lfh.idVisiteur and ff.mois = lfh.mois where ff.idVisiteur = "a131" and joining fichefrais FF at FF (lfh.montant). Mois = "201312" Here are two questions to add which gives me a tap result, but I hope that 90:
select (select (lf.quantite) fraisforfait Join lignefraisforfait louf on the internal from f lf.idFraisForfait = f.id inner ff.i DVisiteur = lf.idVisiteur and ff.mois = lf.mois where lf.idVisiteur = "a131" and lf.mois = "201,401") + joining fichefrais FF (from lignefraishorsforfait LFH inner ff.idVisiteur = lfh.idVisiteur And select fichefrais ff joining ff.mois = lfh.mois (lfh.montant) where ff.idVisiteur = "a131" and ff.mois = "201,401") as montantValide; Does anyone have a solution to this problem? Thanks for your time.
You need to add something that your NULL a 0 . Select Collages (Yoga (LFH Montantent), 0)
Comments
Post a Comment