Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

"Syntax error in FROM clause" when getting external data


View products that this article applies to.

Symptoms

When you use Microsoft Query to return external data to a worksheet in Microsoft Excel or when you view returned data in Microsoft Query, you may receive the following error message:
Syntax error in FROM clause.

↑ Back to the top


Cause

This problem occurs if you attempt to retrieve data from a Microsoft Access or Microsoft Excel database, and the path to the database contains a period (.), for example:
C:\My.Test\Northwind.mdb

↑ Back to the top


Workaround

To work around this problem, change the path to the database so that it does not contain any periods, for example:
C:\MyTest\Northwind.mdb C:\My Test\Northwind.mdb
NOTE: You may use a period before the file name extension (.mdb in this case).

↑ Back to the top


More information

When the path to the file contains a period, the path is qualified incorrectly by Microsoft Query. As a result, the Structured Query Language (SQL) statement for the data you are retrieving is incorrect, and you receive the error message in the "Symptoms" section.

↑ Back to the top


Keywords: KB214377, kbprb, kbpending, kberrmsg

↑ Back to the top

Article Info
Article ID : 214377
Revision : 7
Created on : 3/22/2007
Published on : 3/22/2007
Exists online : False
Views : 233