This section describes how to write SQL statements to retrieve data. To interactively query data without writing SQL statements, use Query Builder. You can also start creating a query in Query Builder and then add your own SQL. See Write SQL Statements in Query Builder for details.
1.
|
Select File > Database > Open Table.
|
2.
|
3.
|
From the Database Open Table window, click the Advanced button to open specific subsets of a table.
|
4.
|
Either type in a valid SQL statement, or modify the default statement. Import Data from a Database shows a default SQL Select statement appropriate for the selected file. See Structured Query Language (SQL): A Reference, for a description of SQL statements that you can use.
|
Instead, you can add expressions by clicking the Where button and using the WHERE Clause editor to create expressions. See Use the WHERE Clause Editor, for details.
5.
|
Click Execute SQL. A JMP data table appears with the columns that you selected. (For details, see Use Table Variables in Enter and Edit Data.)
|
6.
|
To see the status of all running queries, select View > Running Queries.
|
Note that you can enter any valid SQL statement and click Execute SQL to execute the command. Valid SQL varies with the data source and ODBC driver.