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 2.0 SP4 - Syntax error in query

Status
Not open for further replies.

applywithforce

Technical User
Mar 31, 2005
21
0
0
GB
Hi guys,

I am new to SMS and in the process trying to run a query to check for PC's that are able to upgrade to Windows XP SP2.

Here is what I have inserted into the Query Statement properties:

// ***** Class : SMS_Query *****
[SecurityVerbs(140551)]
instance of SMS_Query
{
Comments = "All Windows XP clients that have enough disk space to upgrade to Windows XP SP2";
Expression = "select SMS_R_System.Name, SMS_R_System.SMSInstalledSites, SMS_G_System_OPERATING_SYSTEM.Caption, SMS_G_System_OPERATING_SYSTEM.CSDVersion, SMS_G_System_LOGICAL_DISK.FreeSpace from SMS_R_System inner join SMS_G_System_LOGICAL_DISK on SMS_G_System_LOGICAL_DISK.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_LOGICAL_DISK.FreeSpace >= 1500 and SMS_G_System_LOGICAL_DISK.DeviceID = \"C:\" and SMS_R_System.OperatingSystemNameandVersion like \"Microsoft Windows NT Workstation 5.1\"";
LimitToCollectionID = "";
Name = "Clients ready for Windows XP SP2 Upgrade";
QueryID = "";
TargetClassName = "SMS_R_System";
};
// ***** End *****

When I click OK, it displays:

*******************************************************
This query has a syntax error. Are you sure you want to save it?
*******************************************************

I can save the query despite the error, however, no results are displayed when I run it.

I copied the code from the Deploying Windows XP SP2 with System Management Server white paper from Microsoft.

All help appreciated! :D



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top