dbXpert for Oracle

Features Review

Master Detail Browser - make it easy to view data in master-detail structure




Master Detail Browser - view the SQL text of the master detail statements


Master Detail Browser - copy the text to Workspace to edit manually, press Ctrl+M to rerun it.

The following shows two sample SQL statements for the Master Detail Queries. To join the master and detail, just simply put the bind varaible with the format :<MASTER TABLE ALIAS>__<FIELD_NAME> (double underline between the alias and the field name). Please be reminded that the Master SQL statments must be put prior to the detail SQL statements.

Example 1:

SELECT JOB_ID , JOB_TITLE , MIN_SALARY , MAX_SALARY
FROM HR.JOBS JOBS

SELECT EMPLOYEE_ID , FIRST_NAME , LAST_NAME , EMAIL , PHONE_NUMBER , HIRE_DATE , JOB_ID , SALARY , COMMISSION_PCT , MANAGER_ID , DEPARTMENT_ID
FROM HR.EMPLOYEES EMPLOYEES
WHERE :JOBS__JOB_ID = JOB_ID

SELECT EMPLOYEE_ID , START_DATE , END_DATE , JOB_ID , DEPARTMENT_ID
FROM HR.JOB_HISTORY JOB_HISTORY
WHERE :JOBS__JOB_ID = JOB_ID

Example 2:

SELECT REGION_ID , REGION_NAME
FROM HR.REGIONS REGIONS

SELECT COUNTRY_ID , COUNTRY_NAME , REGION_ID
FROM HR.COUNTRIES COUNTRIES
WHERE :REGIONS__REGION_ID = REGION_ID

SELECT *
FROM HR.LOCATIONS LOCATIONS
WHERE :COUNTRIES__COUNTRY_ID = COUNTRY_ID