problem with left outer join
Posted: Sat 21 May 2011 09:33
Hello,
I have a problem with left outer join command!
I don't get the result i need!
I got a table with naw (customers) and a table with project
I want to join these tables with the left outer join command.
sql code:
SELECT n.klantnummer , n.bedrijfsnaam, n.adres, postcode, plaats, branche, agent, n.unieknummer, p.aanvraagdatum, p.projectnummer,p.opleverdatum
FROM naw n
LEFT OUTER JOIN project p ON n.unieknummer = p.unieknummer
WHERE n.agent = 'Frank van Logten'
AND p.opleverdatum >= '01-01-2011'
ORDER BY bedrijfsnaam
The result only show the customers where agent is Frank van Logten and where the opleverdatum >= 01-01-2011
The customers of agent Frank van Logten who don't have opleverdatum >= 01-01-2011 are not shown in this result?!
What am i doing wrong?
P.s. I use the trail version of sdac for Delhi 2009
I'm using dbf files at the moment but want to switch to MSSQL and now i'm testing sdac
I have a problem with left outer join command!
I don't get the result i need!
I got a table with naw (customers) and a table with project
I want to join these tables with the left outer join command.
sql code:
SELECT n.klantnummer , n.bedrijfsnaam, n.adres, postcode, plaats, branche, agent, n.unieknummer, p.aanvraagdatum, p.projectnummer,p.opleverdatum
FROM naw n
LEFT OUTER JOIN project p ON n.unieknummer = p.unieknummer
WHERE n.agent = 'Frank van Logten'
AND p.opleverdatum >= '01-01-2011'
ORDER BY bedrijfsnaam
The result only show the customers where agent is Frank van Logten and where the opleverdatum >= 01-01-2011
The customers of agent Frank van Logten who don't have opleverdatum >= 01-01-2011 are not shown in this result?!
What am i doing wrong?
P.s. I use the trail version of sdac for Delhi 2009
I'm using dbf files at the moment but want to switch to MSSQL and now i'm testing sdac