Microsoft KB Archive/249177: Difference between revisions

From BetaArchive Wiki
(importing KB archive)
 
m (Text replacement - """ to """)
 
(2 intermediate revisions by the same user not shown)
Line 12: Line 12:
<div id="TitleRow">
<div id="TitleRow">


= <span id="KB249177"></span>Error Message: &quot;Syntax Error in Query...&quot; Performing Query with a Date =
= <span id="KB249177"></span>Error Message: "Syntax Error in Query..." Performing Query with a Date =




Line 48: Line 48:
<div class="errormessage">
<div class="errormessage">


Syntax error [missing operator] in query expression '(&lt;Table Name&gt;.&lt;Fieldname&gt;=ts '100-07-04 00:00:00'})'.
Syntax error [missing operator] in query expression '(<Table Name>.<Fieldname>=ts '100-07-04 00:00:00'})'.


</div>
</div>
Line 59: Line 59:
<div class="errormessage">
<div class="errormessage">


Syntax error in query expression '(&lt;Table Name&gt;.&lt;Fieldname&gt;=ts '100-0)'.
Syntax error in query expression '(<Table Name>.<Fieldname>=ts '100-0)'.


</div>
</div>
<br />
<br />
where &lt;Table Name&gt; is the name of the table and &lt;Fieldname&gt; is the name of the field that you are querying.<br />
where <Table Name> is the name of the table and <Fieldname> is the name of the field that you are querying.<br />
<br />
<br />
NOTE: This error message will vary according to the version of Microsoft Data Access Components installed. It also will vary depending on the driver.
NOTE: This error message will vary according to the version of Microsoft Data Access Components installed. It also will vary depending on the driver.

Latest revision as of 12:51, 21 July 2020

Knowledge Base


Error Message: "Syntax Error in Query..." Performing Query with a Date

Article ID: 249177

Article Last Modified on 8/18/2005



APPLIES TO

  • Microsoft Excel 95 Standard Edition
  • Microsoft Query 2000



This article was previously published under Q249177

SYMPTOMS

When you enter a date in the Criteria pane of your query, you receive an error message similar to one of the following:

Syntax error [missing operator] in query expression '(.<Fieldname>=ts '100-07-04 00:00:00'})'.

-or-


Syntax error in query expression '(
.<Fieldname>=ts '100-0)'.


where
is the name of the table and <Fieldname> is the name of the field that you are querying.

NOTE: This error message will vary according to the version of Microsoft Data Access Components installed. It also will vary depending on the driver.

CAUSE

This issue will occur when the following conditions are true:

  • You enter a date value that does not include the year.


-and-

  • The current date setting on your computer is later than December 31, 1999.


WORKAROUND

To work around the issue, always specify the year portion of the date when your system clock is set to a date later than December 31, 1999.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.


Additional query words: XL2000 y2k Query95

Keywords: kbprb KB249177