SELECT COUNT as a ROW??
Hi there, here is my dilema
I have a table of departments, with department codes, ie
I also have a table of PC's that are named with department codes, ie
I want to list all the departmens and next to them display how many PC's are in their department.
I have two queries:
1: SELECT * FROM department ORDER BY departmentname;
2: SELECT COUNT(DISTINCE computerrecno) AS 'computercount' FROM computers WHERE computername like 'TWO%'
So my first query lists the departments and the second returns a count of PC's where their name starts with TWO.
So; Can i merge these queries so my output looks like...
where the numbers are the pc's within a department?
Thanks for any help.