Excel: Error When Extracting Conditional Dates with QE.XLALast reviewed: November 29, 1994Article ID: Q86854 |
The information in this article applies to:
SUMMARYWhen extracting conditional dates from an external database using the QE.XLA in Microsoft Excel version 4.0, the error message "Error In SQL Statement" may be generated if braces ({}) are not included around the date values in the Criteria field.
MORE INFORMATIONWith the QE.XLA add-in loaded, data from external databases can be extracted into a Microsoft Excel worksheet. When using the conditional operators <,>, >=,<= and <> with a date in a Criteria field, the error message "Error In SQL Statement" will appear if braces ({}) are not included around the date value. The QE.XLA for Microsoft Excel 4.0 does not add the required braces around the date before the query is passed to Q+E, thus creating a SQL syntax error.
WorkaroundThe ({}) braces must be entered manually around the date in the Criteria before the extract is executed. Example: DATE_FIELD >={8/11/92} DATE_FIELD is the field heading in the Criteria.
REFERENCES"Q+E for Microsoft Excel User's Guide," version 3.0a, included in Microsoft Excel version 4.00 pages 57-66
|
KBCategory: kbinterop
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |