Querying an ODBC data source from FileMaker Pro
After configuring an ODBC client driver, you can interact with records, import records into an existing FileMaker Pro database file, or create a new FileMaker Pro database file from an ODBC data source (such as Oracle or Microsoft Access databases).
First, you access the data source you want to import from. Then you construct a query for the records you want to import from the data source. Finally, if you’re importing data into an existing file, you map fields from your data source to fields in your FileMaker Pro database file.
Important  See Connecting to data sources for information on how you can access and work with ODBC data sources without writing SQL queries.
You can access your ODBC data source through the File menu, with the Import Records script step, or with the Execute SQL script step.
All applications that support ODBC recognize a basic subset of SQL (Structured Query Language) statements. SQL is passed through the ODBC interface to the data source, performing queries such as SELECT first_name, last_name FROM customers WHERE city=N'Paris' and making updates such as the creation of a new record with INSERT INTO customers (first_name, last_name) VALUES (N'Jane',N'Smith').
Note  Because Microsoft SQL Server supports both Unicode and non-Unicode field types, you must prefix all Unicode strings with an uppercase “N” (which stands for “National” in the SQL-92 standard). Otherwise, when a Unicode string containing non-English characters is passed to Microsoft SQL Server, you may lose any data that doesn’t exist in the Microsoft SQL Server code page.
To query an ODBC data source from FileMaker Pro:
1.
 •
To import into an existing FileMaker Pro file, choose File menu > Import Records > ODBC Data Source.
 •
To create a FileMaker Pro file from the data source records, choose File menu > Open. In the Open dialog box, choose ODBC Data Source for Files of type (Windows) or Show (OS X).
2.
Most server-based ODBC drivers require the data source to be open, but the requirement varies depending on the driver.
3.
To skip this dialog box in the future, select Save user name and password (this option is only available if you’re importing into an existing FileMaker Pro file).
4.
The FileMaker Pro SQL Query builder dialog box appears.
5.
You can execute the query immediately, or copy and paste it into a field for later use. Use the Import Records or Execute SQL script step to execute a query stored in a field. See Storing an SQL query in a field for details.
6.
Click Execute.
 •
 •
Note  ODBC import, the Execute SQL script step, and external SQL data sources are not supported in runtime solutions created with FileMaker Pro Advanced.
Related topics 
Using ODBC and JDBC with FileMaker Pro
Configuring an ODBC client driver
Topics in this section
Constructing an SQL query for importing via ODBC
Executing SQL to interact with data sources via ODBC
Storing an SQL query in a field
Automating ODBC import using the Import Records script step