Good morning,
I have a query I plan to base a report on, and am having trouble with something which seems as though it should be quite basic, but as I'm new to this I am struggling.
Essentially I want to produce a query which looks at a table and says how many records came from each department. I have two tables, one where the data is recorded (tblAdjustments) and another, centrally linked, which gives the department name and ID (Department).
In my current query I have all of the relevant information, however can't show the Department Name, I just keep getting the Department ID. Below is my code:
SELECT Count(tblAdjustments.ID) AS CountOfID, tblAdjustments.DeptName
FROM Department INNER JOIN tblAdjustments ON Department.Dept_Id = tblAdjustments.DeptName
GROUP BY tblAdjustments.DeptName;
I am new to creating queries so I am hoping it is something fairly simple, and hopefully can take any help from this to other work of a similar nature.
Thanks in advance for any help!
Dan
I have a query I plan to base a report on, and am having trouble with something which seems as though it should be quite basic, but as I'm new to this I am struggling.
Essentially I want to produce a query which looks at a table and says how many records came from each department. I have two tables, one where the data is recorded (tblAdjustments) and another, centrally linked, which gives the department name and ID (Department).
In my current query I have all of the relevant information, however can't show the Department Name, I just keep getting the Department ID. Below is my code:
SELECT Count(tblAdjustments.ID) AS CountOfID, tblAdjustments.DeptName
FROM Department INNER JOIN tblAdjustments ON Department.Dept_Id = tblAdjustments.DeptName
GROUP BY tblAdjustments.DeptName;
I am new to creating queries so I am hoping it is something fairly simple, and hopefully can take any help from this to other work of a similar nature.
Thanks in advance for any help!
Dan