1. Home
  2. Importing and Exporting Data
  3. ODBC Databases
  4. ODBC Data Query – Filter Data Using Where Statement

ODBC Data Query – Filter Data Using Where Statement

 ODBC Data Query – Filter Data Using Where Statement Use this to specify a Where clause to use in your data query. A Where clause in an SQL statement restricts (or filters) the rows which are returned by SQL query. The Clause is in the form of a logical statement which must be TRUE for the row to be included in the result set. The lists at the bottom of the menu list the available columns, functions and operators that can be used to build the clause.

Only include rows Where

A text editor into which you can type a where clause.

Available Columns

List of available columns from current table that can be used in the where clause. Double clicking on a column name will insert it into the where clause at the current cursor position.

Available Functions

List of available SQL functions that can be used in the where clause. Double clicking on a function name will insert it into the where clause at the current cursor position.

Operators

List of available operators that can be used in the where clause. Double clicking on an operator will insert it into the where clause at the current cursor position.

Action Buttons

Clear Removes all the text from the current where clause.
Back Return to the ODBC Data Query – Select Data dialog.
Next Proceed to the ODBC Data Query – Finish dialog.
Finish Close the dialog and run the SQL query.
Cancel Close the dialog without running the SQL query.

Examples of a Where clause

  • Height < 150
  • ABS(PaymentDate-InvoiceDate) > 30
  • Weight1 < Weight2 AND Weight2 < Weight3
  • UCASE(Treat) = ‘CONTROL’ OR UCASE(Treat) = ‘SHORT’

See Also

SQL Statements
ODBC Databases Create New Database Table from Spreadsheet
Insert Spreadsheet into Database
Merge Spreadsheet into Database
Run ODBC Export Link (GLK) file
Spreadsheet Export Menu
Spreadsheet Add Data Menu
Spreadsheet New Menu
Using ODBC with 64bit Windows
DBIMPORT procedure
DBEXPORT procedure

Updated on November 29, 2017

Was this article helpful?