Database Guide
To specify the example SQL SELECT statement
SELECT EMPLOYEE.JOBCODE, WAGES.GROSSPAY, EMPLOYEE.NAME
FROM EMPLOYEE, WAGES
WHERE (EMPLOYEE.NUMBER = WAGES.EMPNUMBER) AND (EMPLOYEE.STATE = 'NC')
ORDER BY EMPLOYEE.JOBCODE ASC, WAGES.GROSSPAY DESC
do the following:
- In the Query name field, type a name for the SELECT
statement.
- In the Description field, type a description for the SELECT
statement.
- In the Tables/views list, select EMPLOYEE and
WAGES.
- In the Columns list, select EMPLOYEE.JOBCODE,
EMPLOYEE.NAME, and WAGES.GROSSPAY.
- In the Column sequence list, select
EMPLOYEE.NAME.
- From the Column sequence pop-up menu, select Move
after > WAGES.GROSSPAY.
- From the Clause pull-down menu, select WHERE.
- On the WHERE Details window, do the following:
- In the Left operand field, select
EMPLOYEE.NUMBER from the list.
- In the Operator field, select = from the
list.
- In the Right operand field, select
WAGES.EMPNUMBER from the list.
- Select Add to operand lists.
- In the Left operand field, select
EMPLOYEE.STATE from the list.
- In the Operator field, select = from the
list.
- In the Right operand field, type NC.
- From the Unary operator pull-down menu, select Right
operand > String constant
'x'.
- Select Add to operand lists.
- In the Left operand field., select
(EMPLOYEE.NUMBER = WAGES.EMPNUMBER) from the
list.
- In the Operator field, select AND from the
list.
- In the Right operand field, select (EMPLOYEE.STATE
= 'NC') from the list.
- Select Apply.
- From the Clause pull-down menu, select ORDER
BY.
- On the ORDER BY Details window, do the following:
- In the Columns list, select EMPLOYEE.JOBCODE
and WAGES.GROSSPAY.
- In the ORDER BY sequence list, select
WAGES.GROSSPAY.
- From the ORDER BY sequence pop-up menu, select Descending
(DESC).
- Select Apply.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]