Global WHERE Conditions Window
Add, Edit, Delete global where conditions as per the toolbar.
The Add and Edit buttons open the Global WHERE Definition dialog. Global Where entries are in the form of <expression1> <operator> <expression2>.
TIP: You could alternatively populate the WHERE clause via the Criteria Tab. Entries into the cells of the Criteria tab should be in the form of <operator> <expression2>.
Construct the following query
SELECT dept.deptno, dept.dname, dept.loc
WHERE ((dept.deptno BETWEEN 1 AND 25)
AND (dept.deptno < 40)
AND (dept.loc IS NOT NULL)
Follow the numbered steps
- Open the SQL Modeler (as SCOTT/TIGER).
- Double-click DEPT to add it to the model.
- Right-click DEPT and choose Select All.
- On the criteria tab, double click the Where Cond. cell under DEPTNO.
- Choose < and fill in the value 40. Click OK.
- On the criteria tab, double click the Where Cond. cell under LOC and then choose the Expert tab and click Yes at the warning dialog.
- In the top edit box, enter IS NULL. Click OK.
- On the criteria tab, double-click the OR cell under LOC. Choose the Expert tab and click Yes at the warning dialog.
- In the top edit box, enter = 'CHICAGO'
- In the table model area (the area around the table images), right-click and choose SQL>Global Where
- In the top edit box, enter Data Field DEPT.DEPTNO. Click OK.
- From the SQL Function panel, select BETWEEN _Const_ AND _Const_. Replace the constants with values, for example 1 and 25 respectively. Click OK twice.
- View the generated query. It should appear as described above.