Write Custom SQL for Oracle Argus Insight Advance Condition
The following are the steps to create custom SQL for Oracle Argus Insight Advanced Condition:
- Login to Oracle Argus Insight.
- Navigate to Queries > Advance Condition > New (Insight Mart).
- Add a field, and save the advance condition.
- Click View SQL. The Advanced Conditions SQL screen appears.
- Write the custom SQL as per the format given below:
Query Format:
SELECT DISTINCT V_RPT_CASE.CASE_ID FROM V_RPT_CASE, <additionaltable(s)> WHERE <filter clause(s)>
Example 1: Custom SQL using a single table
SELECT DISTINCT V_RPT_CASE.CASE_ID FROM V_RPT_CASE WHERE ((UPPER(V_RPT_CASE.CASE_NUM)=UPPER('CASE001')))
Example 2: Custom SQL using two or more tables
SELECT DISTINCT V_RPT_CASE.CASE_ID FROM V_RPT_CASE, V_RPT_PRODUCT WHERE (V_RPT_CASE.CASE_ID = V_RPT_PRODUCT.CASE_ID AND ( (UPPER(V_RPT_CASE.CASE_NUM) =UPPER('CASE001')) AND (V_RPT_PRODUCT.COUNTRY_ID=223)))
Note:
- Make sure the query begins with
SELECT DISTINCT V_RPT_CASE.CASE_ID FROM V_RPT_CASE
. - Make sure the query is well formatted and executable without any parameters.
- Do not use ";" at the end of the query.
- Do not use comments in the query.
- Make sure the query begins with
Parent topic: Write Custom SQL in Advance Condition