I have 3 fields, p_ID, unit_type, and Units
Unit_Type has 2 different values, 'sf' and 'u'
If 'u', then the Units field is fine but if 'sf', then i would like it to count the amount of times that p_id appears.
in access we used a Sum(IIF(unit_type='sf',1,Units)) AS Total_Units
I am having trouble doing this in SQL, any thoughts?