Give this a try:
 
Select DISTINCT sys.NetBios_Name0, arp.DisplayName0, arp.Version0,
[Chrome.exe Version] = MAX(CASE WHEN SF.FileName Like 'Chrome.exe%' Then 
SF.FileVersion Else ' ' End)
>From v_Add_Remove_Programs arp
join v_R_System sys on arp.Resourceid = sys.resourceid
full join v_GS_SoftwareFile SF on SYS.ResourceID = SF.ResourceID
Where DisplayName0 like '%Google Chrome%'
Group by sys.Netbios_Name0, arp.DisplayName0, arp.Version0
 
Date: Thu, 5 Dec 2013 16:23:43 -0600
From: [email protected]
To: [email protected]
Subject: [mssms] SQL Query Help

When I run this query I have about 10000 records
Select DISTINCT NetBios_Name0, DisplayName0, Version0From v_Add_Remove_Programs 
arpjoin v_R_System sys on arp.Resourceid = sys.resourceid--full join 
v_GS_SoftwareFile SF on SYS.ResourceID = SF.ResourceIDWhere DisplayName0 like 
'%Google Chrome%' 
When I run this query I have about 7000 records
Select DISTINCT NetBios_Name0, DisplayName0, Version0, SF.FileName, 
SF.FileDescription, SF.FileVersionFrom v_Add_Remove_Programs arpjoin v_R_System 
sys on arp.Resourceid = sys.resourceidfull join v_GS_SoftwareFile SF on 
SYS.ResourceID = SF.ResourceIDWhere DisplayName0 like '%Google Chrome%' and 
SF.FileName like 'Chrome.exe%'
Is there a way to run the first query where it will show me all 10000 records 
and just fill in the information for SF.FileName, SF.FileDescription, 
SF.FileVersion if it exist and leave it blankif it does not.
Thanks
Any Help will be highly appreciated.




                                          


Reply via email to