SQL Distinct count sub query problem
Hello, I have a problem where my table tblskid has the following data:
ID, Code, Name, EQUIP
1, 920, Clinton, Jacob, Motor pool
1, 920, Clinton, Jacob, Motor pool
1, 920, Clinton, Jacob, Motor pool
1, 920, Clinton, Jacob, Motor pool
I need the distinct count(EQUIP) TO be 1 see below:
SELECT DISTINCT Count(tblskid.EQUIP) AS CountOfEQUIP, tblskid.Code, tblskid.ID, tblskid.Name
FROM tblskid
GROUP BY tblskid.Code, tblskid.ID, tblskid.Name;
this query above comes back 4, please help me from sending all the data to a function using a recordset that's the only way I can get 1. Sorry for the space formatting.
Thank you for your attention to this issue.
|