Add, Edit, Delete global having conditions as per the toolbar.
The Add and Edit buttons open the Global HAVING Definition dialog. Global Having entries are in the form of <expression1> <operator> <expression2>.
|
TIP: You could alternatively populate the HAVING clause via the Criteria Tab. First set a GROUPed BY field. Then set the Having clause for that field by entering it in the group cond. row. This has the limitation that you can only have the selected field on the left side of the relational operator. If you need to have multiple fields on that side of the operator, use the Global Having feature. |
Construct the following query
SELECT emp.empno, emp.ename, emp.job, emp.mgr, emp.sal,
emp.comm, emp.deptno
FROM emp
GROUP BY emp.deptno, emp.comm, emp.sal, emp.mgr, emp.job,
emp.ename, emp.empno
HAVING ((emp.sal + NVL (emp.comm, 0) > 4000))
Follow the numbered steps
View the generated query.
It should appear as described above. This query selects all the employees whose salary plus commission is greater than 4000. The NVL command substitutes a null value in the specified column with the specified value, in this case, 0.
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Términos de uso Privacidad Cookie Preference Center