Report for mislabeled Computer Descriptions
I'm trying to put together a MySql Query to determine which machines on my network have a improper computer description. Our standard is last name, first name in the description. I'm not sure it is even possible, but this so far has come close:
select distinct MACHINE.NAME as MNAME, MACHINE.SYSTEM_DESCRIPTION as MDESCRIPT
from (MACHINE,MACHINE_DISKS, MACHINE_NICS)
where MACHINE.ID = MACHINE_DISKS.ID
and MACHINE.ID = MACHINE_NICS.ID
and MACHINE.SYSTEM_DESCRIPTION not like '%, %'
order by MNAME
It may not be possible and I'm no SQL guru, so I'd figured I'd ask.
Thanks in advance for your help!!
select NAME, SYSTEM_DESCRIPTION from MACHINE where SYSTEM_DESCRIPTION not like '%, %' order by NAME
Community Chosen Answer
What do you get when you run the report? Your SQL includes some things it really doesn't need, here's a very basic statement that should find what you're looking for:
select NAME, SYSTEM_DESCRIPTION
where SYSTEM_DESCRIPTION not like '%, %'
order by NAME