Complex Queries In Oracle Application Forms

It is a little known fact that SQL operators such as "between", "in", and "is not null" as well as built in functions such as "nvl", "to_date", and "length" are all available for use when querying in Oracle Application Forms.  Normal forms querying is available in conjunction with the complex queries.  To accomplish this, simply:

1. Invoke "Enter Query" mode

2. In the desired field(s), enter a ":" (colon) followed by a variable name.  This will create a bind variable that can
subsequently be used in a complex query.

3. In the desired field(s), enter normal query criteria.

4. Execute the Query

5. In the "Query/Where" window that appears, enter the query using the bind variable and click the "OK" button.  The query will execute and return the appropriate data.  Do NOT include the word where.

As an example, suppose it is useful to query all Employees with Hire Dates between 01-JAN-1999 and 31-JAN-1999 in the Oracle Human Resources People Enter and Maintain form:

1. Invoke "Enter Query" mode

2. In the Hire Date field, enter  :hire_date

3. In the Type field, enter Employee

4. Execute the Query

5. In the "Query/Where" window that appears, enter trunc(:hire_date) between to_date('01-JAN-1999','DD-MON-YYYY')
and to_date('31-JAN-1999','DD-MON-YYYY')

6. Click the 'OK' button. The query will execute and return the desired data.

Have a Oracle Question
Do you have an Oracle Question?

Oracle Books
Oracle Certification, Database Administration, SQL, Application, Programming Reference Books

Oracle Application
Oracle Application Hints and Tips

Oracle Home
Oracle Database, SQL, Application, Programming Tips

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.
The site www.erpgreat.com is not affiliated with or endorsed by any company listed at this site.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
 The content on this site may not be reproduced or redistributed without the express written permission of
www.erpgreat.com or the content authors.