CarlRostron
Registered User.
- Local time
- Today, 16:33
- Joined
- Nov 14, 2011
- Messages
- 88
No idea why but I am running a query and I am getting the wrong results:
I am filtering out on lots of things but specifically where RegionArea is either "N" or "n" but you can see in the attcahed screenshots that the SQL query is giving me back results which have N in them
Please help.
Code:
SELECT TOffice.OfficeName, TRevisionType.TypeName, TProjectManager.PlannerForename AS PMForename, TProjectManager.PlannerSurname AS PMSurname, TRevisionDetail.NoPhases, TRevisionDetail.Phase1Deploy, TRevisionDetail.Phase1DeployReforecast, TOffice.RegionArea
FROM TRevisionType INNER JOIN ((TProjectManager INNER JOIN (TOffice INNER JOIN TRevision ON TOffice.OfficeID = TRevision.OfficeID) ON (TProjectManager.ProjectManagerID = TRevision.ManagedBy) AND (TProjectManager.ProjectManagerID = TOffice.ManagedBy)) INNER JOIN TRevisionDetail ON TRevision.RevisionID = TRevisionDetail.RevisionID) ON TRevisionType.TypeID = TRevisionDetail.RevisionType
WHERE (((TRevisionDetail.Phase1DeployReforecast)>Format(#11/15/2011#,"dd/mm/yyyy") And (TRevisionDetail.Phase1DeployReforecast)<=Format(#11/22/2011#,"dd/mm/yyyy")) AND ((TOffice.RegionArea)="n" Or (TOffice.RegionArea)="N")) OR (((TRevisionDetail.Phase1DeployReforecast)>Format(#11/15/2011#,"dd/mm/yyyy") And (TRevisionDetail.Phase1DeployReforecast)<=Format(#11/22/2011#,"dd/mm/yyyy")))
ORDER BY TOffice.OfficeName;
I am filtering out on lots of things but specifically where RegionArea is either "N" or "n" but you can see in the attcahed screenshots that the SQL query is giving me back results which have N in them
Please help.