The following table shows how you can use the IN clause to retrieve data from an external database. In each example, assume the hypothetical Customers table is stored in an external database.
External database | SQL statement |
---|---|
Microsoft® Jet database | SELECT CustomerID |
dBASE III or IV. To retrieve data from a dBASE III table, substitute "dBASE III;" for "dBASE IV;". |
SELECT CustomerID |
dBASE III or IV using Database syntax. | SELECT CustomerID |
Paradox 3.x or 4.x. To retrieve data from a Paradox version 3.x table, substitute "Paradox 3.x;" for "Paradox 4.x;". |
SELECT CustomerID |
Paradox 3.x or 4.x using Database syntax. | SELECT CustomerID |
A Microsoft Excel worksheet | SELECT CustomerID, CompanyName |
A named range in a worksheet | SELECT CustomerID, CompanyName |