The information in this article applies to:
SYMPTOMSWhen running a WQL query using datetime as a criteria in the format 19981201000000.000000+000, the query fails with the error: To view detailed error information, click the More Information button and look under Properties. The detailed error information for this problem is: Query Failed. SQL Err >> #241 Sev 16: Syntax error converting datetime from character string CAUSEWQL datetime format is not converted to Transact-SQL datetime format. Any WQL query against datetime fails. WQL requires the datepart keyword for this type of query. WORKAROUND
A query using the standard WQL datetime format, such as below, would fail:
Instead, use datepart to build a successful query:
STATUSMicrosoft has confirmed this to be a problem in Systems Management Server version 2.0. MORE INFORMATION
Although using datepart produces the most consistent results, you can query using other datetime formats. Several example queries are listed below. Because SQL stores (and returns) milliseconds, queries that do not anticipate the milliseconds returned by SQL will produce unpredictable results.
Examples of similar queries that are successful:
NOTE: The order of the datetime format is language dependent; the examples given above are based on US English.For additional information about the Systems Management Server Web-Based Enterprise Management Query Language see the Microsoft Systems Management Server Toolkit. Additional query words: prodsms wbem tsql t-sql tran-sql trans-sql
Keywords : kbSMS200 kbSMS200bug kbSMS120 kbSMS120bug kbbug2.00 |
Last Reviewed: March 22, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |