Jim,

 

Thanks this worked perfectly.

 

Stefanie

 

From: [email protected] [mailto:[email protected]]
On Behalf Of Jim Boberg
Sent: Thursday, December 05, 2013 10:42 PM
To: [email protected]
Subject: RE: [mssms] SQL Query Help

 

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:  <mailto:[email protected]> [email protected]
To:  <mailto:[email protected]> [email protected]
Subject: [mssms] SQL Query Help

When I run this query I have about 10000 records

 

Select DISTINCT NetBios_Name0, DisplayName0, Version0

>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%' 

 

When I run this query I have about 7000 records

 

Select DISTINCT NetBios_Name0, DisplayName0, Version0, SF.FileName,
SF.FileDescription, SF.FileVersion

>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%' 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 blank

if it does not.

 

Thanks

 

Any Help will be highly appreciated.

 

 

 

 



Reply via email to