Hi,First time user of SQL thrown right in the deep end so I humbly beg your patience :)I've been working on Access to build my queries and then reverse engineer them to see how the SQL is developed. However, I've just run up against my first incompatable statements.I'm creating a query to return all the missing/null fields for clients in our database, and I would like a count of how many fields are missing. The below query works in Access:SELECT Contacts.Name, IIf(IsNull([Contacts].[Address1]),1,0)+IIf(IsNull([Contacts].[Address2]),1,0)+IIf(IsNull([Contacts].[Town]),1,0)+IIf(IsNull([Contacts].[County]),1,0)+IIf(IsNull([Contacts].[PostCode]),1,0)+IIf(IsNull([Contacts].[Code]),1,0)+IIf(IsNull([Contacts].[Text_1]),1,0)+IIf(IsNull([Contacts].[Text_2]),1,0) AS [Missing RED Fields], Contacts.Address1, Contacts.Address2, Contacts.Town, Contacts.County, Contacts.Country, Contacts.PostCode, Contacts.Code, Contacts.Text_1 AS [Client Group], Contacts.Text_2 AS [Web Login]FROM ContactsWHERE (((Contacts.Address1) Is Null)) OR (((Contacts.Address2) Is Null)) OR (((Contacts.Town) Is Null)) OR (((Contacts.County) Is Null)) OR (((Contacts.Country) Is Null)) OR (((Contacts.PostCode) Is Null)) OR (((Contacts.Code) Is Null)) OR (((Contacts.Text_1) Is Null)) OR (((Contacts.Text_2) Is Null));
I've tried various ways of converting the IIFs to Case When statements, however all the research I've done has been on far more complicated queries that has confused me silly !!! Some help with a solution, or guidence of a good (easy) place to find he answer would be gratefully received.