I have two tables. One table has computer names with a divisional prefix as the first 3 characters. The 2nd table contains the division names in one column and the prefixes in the other as they correspond to the divison name. I need a report that will generate a count of the total computers within a division:
Division name| Count of computers
So, what I've got is:
select divisiontable.name as 'Division Name', count(computertable.name) as 'Number of computers'
from divisontable, computertable
where computertable.name contains (select * from divisiontable.abbreviation)
order by divisiontable.name
Do I need to pass a variable to this thing? Anybody have any ideas? The return I get from this is blank.
Division name| Count of computers
So, what I've got is:
select divisiontable.name as 'Division Name', count(computertable.name) as 'Number of computers'
from divisontable, computertable
where computertable.name contains (select * from divisiontable.abbreviation)
order by divisiontable.name
Do I need to pass a variable to this thing? Anybody have any ideas? The return I get from this is blank.