Hi all, I have Sql in my query:
When I run the query is it possible to make blank fields with value "0"?
Code:
SELECT tbl_CodeOjects.CodeObjectID, tbl_CodeOjects.ObjectType, tbl_Inspections.DateTask, tbl_Inspections.Worker, Count(tbl_Inspections.TypeOfCheck) AS CountCheckTypes, Count(IIf([TypeOfCheck] Like "Current*",1,Null)) AS [Current], Count(IIf([TypeOfCheck] Like "Target*",1,Null)) AS Target, Count(IIf([TypeOfCheck] Like "By Reg*",1,Null)) AS ByReg
FROM (tbl_CodeOjects LEFT JOIN tbl_Objects ON tbl_CodeOjects.CodeObjectID = tbl_Objects.CodeObjectID) LEFT JOIN tbl_Inspections ON tbl_Objects.ObjectID = tbl_Inspections.ObjectID
GROUP BY tbl_CodeOjects.CodeObjectID, tbl_CodeOjects.ObjectType, tbl_Inspections.DateTask, tbl_Inspections.Worker
HAVING (((tbl_Inspections.Worker)=[Forms]![fm_Report2]![cbo_Worker]));