I was wondering if anyone has ever made a report where you are checking you PC's to see if they have certain pieces of software installed. For example I would like:
PC Office 2003 or better Java Adobe Reader
PC1 Yes Yes No
PC2 No Yes Yes
What I have now is basically:
Code:
SELECT DISTINCT T0.[Name],
,CASE WHEN T9.[Name] LIKE 'Microsoft Office%Edition 2003' OR T9.[Name] LIKE 'Microsoft%Office%2007' THEN 'Yes' ELSE 'No' END AS 'Office 2003 or higher installed'
,CASE WHEN T9.[Name] = 'JRE Runtime%' THEN 'Yes' ELSE 'No' END AS 'Java'
,CASE WHEN T9.[Name] = 'Adobe Reader%' THEN 'Yes' ELSE 'No' END AS 'Adobe Reader'
The problem with that is I am getting
PC Office 2003 or better Adobe Reader Java
PC1 No Yes No
PC1 Yes No No
PC1 No No No
PC2 No No Yes
PC2 No Yes No
PC2 No No No
It is checking through the table each time, whereas I need to nest the CASE statements if thats possible so the table checks for each expression, but at the same time to prevent the multiple rows. Any ideas? Thanks.