Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
mqh7
Yak Posting Veteran
58 Posts |
Posted - 2012-09-04 : 16:17:07
|
| this code works with one issue, it returns 2 file path locations for each machine returned. SELECT pc.netbios_name0 AS [PC Name],gs.manufacturer0 AS [Manufacturer],gs.serialnumber0 AS [Serial Number],mo.model0 AS [Model],en.filename AS [EXE Name],en.filepath AS [File Path]FROMv_R_System pc INNER JOIN v_GS_PC_BIOS gs ON pc.ResourceID = gs.ResourceIDINNER JOIN v_GS_COMPUTER_SYSTEM mo ON gs.resourceID = mo.resourceIDINNER JOIN v_GS_SoftwareFile en ON mo.ResourceID = en.ResourceIDWhere (en.FileName LIKE 'dwrcc.exe')Order By [PC Name]-I want to only see file paths that contain 'c:\program files'. I've tried using DECLARE, LIKE and HAVING but I've yet to get it working. |
|
|
chadmat
The Chadinator
1974 Posts |
Posted - 2012-09-04 : 16:22:13
|
| SELECT pc.netbios_name0 AS [PC Name],gs.manufacturer0 AS [Manufacturer],gs.serialnumber0 AS [Serial Number],mo.model0 AS [Model],en.filename AS [EXE Name],en.filepath AS [File Path]FROMv_R_System pc INNER JOIN v_GS_PC_BIOS gs ON pc.ResourceID = gs.ResourceIDINNER JOIN v_GS_COMPUTER_SYSTEM mo ON gs.resourceID = mo.resourceIDINNER JOIN v_GS_SoftwareFile en ON mo.ResourceID = en.ResourceIDWhere (en.FileName LIKE 'dwrcc.exe') ANDen.filepath LIKE 'c:\program files%'Order By [PC Name]-Chad |
 |
|
|
mqh7
Yak Posting Veteran
58 Posts |
Posted - 2012-09-04 : 16:25:16
|
| Duh !!!!!!!!! Now I feel stupid. I tried everything "EXCEPT" a % sigh. Thank you. |
 |
|
|
|
|
|