Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SMS Need help: Report for MS Office installations including system OU

Status
Not open for further replies.
Feb 21, 2008
2
0
0
US
We currently have the following SQL based report in SMS 2003 that does a fair job of listing out all our workstations with Microsoft Office installed. I need to also list out the domain Organizational Unit that each workstation is in and can't seem to get it to work. The value would appear to be dbo.v_RA_System_System_OU_Name0 but when I add that in the section along with the other values for IPSubnets, Netbios_Name, and such, when I run it I get an error:

"The column prefix 'dbo' does not match with a table name or alias name used in the query."

Any help greatly appreciated!

Here is the script as it exists today:

SELECT DISTINCT
dbo.v_RA_System_IPSubnets.IP_Subnets0, dbo.v_R_System.Netbios_Name0, dbo.v_R_System.User_Name0,
dbo.v_GS_ADD_REMOVE_PROGRAMS.DisplayName0
FROM dbo.v_GS_ADD_REMOVE_PROGRAMS LEFT OUTER JOIN
dbo.v_CM_RES_COLL_SMS00004 ON dbo.v_GS_ADD_REMOVE_PROGRAMS.ResourceID = dbo.v_CM_RES_COLL_SMS00004.ResourceID INNER JOIN
dbo.v_R_System ON dbo.v_GS_ADD_REMOVE_PROGRAMS.ResourceID = dbo.v_R_System.ResourceID INNER JOIN
dbo.v_RA_System_IPSubnets ON dbo.v_GS_ADD_REMOVE_PROGRAMS.ResourceID = dbo.v_RA_System_IPSubnets.ResourceID INNER JOIN
dbo.v_GS_SoftwareFile ON dbo.v_GS_ADD_REMOVE_PROGRAMS.ResourceID = dbo.v_GS_SoftwareFile.ResourceID
WHERE (dbo.v_RA_System_IPSubnets.IP_Subnets0 NOT LIKE '%.0.0') AND
((dbo.v_GS_ADD_REMOVE_PROGRAMS.DisplayName0 LIKE '%microsoft%office%pro%' OR
dbo.v_GS_ADD_REMOVE_PROGRAMS.DisplayName0 LIKE '%microsoft%office%stan%') AND
NOT (dbo.v_GS_ADD_REMOVE_PROGRAMS.DisplayName0 LIKE '%visio%' OR dbo.v_GS_ADD_REMOVE_PROGRAMS.DisplayName0 LIKE '%Proof%' OR dbo.v_GS_ADD_REMOVE_PROGRAMS.DisplayName0 LIKE '%Project%'))
ORDER BY dbo.v_RA_System_IPSubnets.IP_Subnets0, dbo.v_R_System.Netbios_Name0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top