Hi, I have the following select query which works fine; SELECT TOP (100) PERCENT dbo.tblDuplicateData.ProjectID, dbo.tblDuplicateData.LoadRef AS Ref, dbo.tblDuplicateData.In_ImpFile AS Imported, dbo.tblDuplicateData.LoadDate, ISNULL(dbo.tblProjectPatients.PatCategory, 'No_Category') AS Category, COUNT(dbo.tblProjectPatients.ProjectPatientID) AS PatsFROM dbo.tblDuplicateData LEFT OUTER JOIN dbo.tblProjectPatients ON dbo.tblDuplicateData.LoadRef = dbo.tblProjectPatients.LoadRefGROUP BY dbo.tblDuplicateData.LoadRef, dbo.tblDuplicateData.In_ImpFile, dbo.tblDuplicateData.LoadDate, dbo.tblDuplicateData.ProjectID, ISNULL(dbo.tblProjectPatients.PatCategory, 'No_Category')ORDER BY dbo.tblDuplicateData.LoadDate, dbo.tblDuplicateData.ProjectID
Now, I have two fields in the table - dbo.tblProjectPatients (pat_eid & GOLDPatIDs. If pat_eids is populated then for that record GOLDPatIDs will be NULL and vice versa. There won't be any scenario where both will have values simultaneously. Now, On the select statement I want to have an identifier column called IDENTIFIER where if GOLDPatIDs is Null then have a value False else have a value True. Any help please.....Thank you