ODBC and JDBC Developer’s Guide
Table Of Contents
- Chapter 1 Introduction
- Chapter 2 Using ODBC to share FileMaker data
- Chapter 3 Using JDBC to share FileMaker data
- Chapter 4 Supported standards
- Appendix A Mapping FileMaker fields to ODBC data types
- Appendix B Mapping FileMaker fields to JDBC data types
- Appendix C ODBC and JDBC error messages
- Index
Supported standards 25
Examples
The following example retrieves the names of employees who make at least 20,000:
SELECT last_name,first_name FROM emp WHERE salary >= 20000
The following example uses the ORDER BY clause to sort by both last name and first name in ascending order:
SELECT emp_id, last_name, first_name FROM emp ORDER BY last_name, first_name
Additional examples:
Notes from the examples
A constant is a single, literal value you can include in a SELECT statement, whereas a column is a reference
to a field in the FileMaker database file (the field can contain many distinct values).
The asterisk (*) wildcard character is shorthand for “everything”. For the example SELECT * FROM
Salespeople, the result is all the rows in the Salespeople table. For the example SELECT DISTINCT * FROM
Salespeople, the result is all the unique rows in the Salespeople table (no duplicates).
Note SELECT * statements on larger databases might not function correctly. To avoid potential confusion,
avoid wildcards and specify table and column names (without aliases).
Using Sample SQL
text constant SELECT 'CatDog' FROM Salespeople
numeric constant SELECT 999 FROM Salespeople
date constant SELECT DATE '2004-06-05' FROM Salespeople
time constant SELECT TIME '02:49:03' FROM Salespeople
timestamp constant SELECT TIMESTAMP '2004-06-05 02:49:03' FROM Salespeople
text column SELECT Company_Name FROM Sales_Data
SELECT DISTINCT Company_Name FROM Sales_Data
numeric column SELECT Amount FROM Sales_Data
SELECT DISTINCT Amount FROM Sales_Data
date column SELECT Date_Sold FROM Sales_Data
SELECT DISTINCT Date_Sold FROM Sales_Data
time column SELECT Time_Sold FROM Sales_Data
SELECT DISTINCT Time_Sold FROM Sales_Data
timestamp column SELECT Timestamp_Sold FROM Sales_Data
SELECT DISTINCT Timestamp_Sold FROM Sales_Data
BLOB
a
column
a. A BLOB is a FileMaker database file container field.
SELECT Company_Brochures FROM Sales_Data
SELECT GETAS(Company_Logo, 'JPEG') FROM Sales_Data
Wildcard * SELECT * FROM Salespeople
SELECT DISTINCT * FROM Salespeople