XL: "Syntax Error in FROM Clause" When Getting External Data

Last reviewed: January 7, 1998
Article ID: Q171899
The information in this article applies to:
  • Microsoft Excel 97 for Windows
  • Microsoft Excel for Windows 95, versions 7.0, 7.0a

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.

CAUSE

This problem occurs if the following conditions are true:

  • You attempt to retrieve data from a Microsoft Access database.

        -and-
    
  • The path to the database contains a period (.), for example:

          C:\My.Test\Northwind.mdb
    

        -or-
    
  • You attempt to retrieve data from a Microsoft Excel workbook.

        -and-
    
  • The table range in the workbook is called "Database".

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).

Or, rename the table range in the workbook to a name other than "Database".

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

When the file name path 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.


Additional query words: XL97 XL7 7.0 msquery get external data create new
query
Keywords : kberrmsg kbtool
Version : WINDOWS:7.0,7.0a,97
Platform : WINDOWS
Issue type : kbbug
Solution Type : kbworkaround


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 7, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.