No calculation with null field

AccessFreak

Registered User.
Local time
Today, 18:43
Joined
Feb 19, 2009
Messages
69
my select statement:
SELECT b.boekingsnr, k.klantnr, k.achternaam, (v.prijs_laagseizoen * COUNT(d.boekingsnr))AS vervoerskosten, (((b.aantal_eenpersoonskamers * a.prijs_eenpersoonskamer_laagseizoen) + (b.aantal_tweepersoonskamers * a.prijs_tweepersoonskamer_laagseizoen))* DATEDIFF(day,b.begindatum,b.einddatum)) AS accommodatiekosten
FROM (Klant k INNER JOIN (Accommodatie a INNER JOIN (Deelnemer d INNER JOIN Boeking b ON d.boekingsnr = b.boekingsnr) ON (a.accommodatienr = b.accommodatienr) AND (a.plaatscode = b.plaatscode)) ON k.klantnr = b.klantnr) RIGHT OUTER JOIN Vervoer v ON b.vervoercode = v.vervoercode
WHERE b.begindatum IN (SELECT s.begindatum
FROM Seizoen s
WHERE vakantie IS NULL)
GROUP BY b.boekingsnr, k.klantnr, k.achternaam, v.prijs_laagseizoen, b.aantal_eenpersoonskamers, a.prijs_eenpersoonskamer_laagseizoen, b.aantal_tweepersoonskamers, a.prijs_tweepersoonskamer_laagseizoen, b.begindatum, b.einddatum


The problem is because v.vervoercode can be NULL, there are records with a null value. These records will not be shown. I want it to show NULL value and be visible at the results.
 

Users who are viewing this thread

Back
Top Bottom