Joins are not automatically displaying in SQL Modeler.
Confirm that there is a constraint (primary or foreign) on the table in question, otherwise the join will not appear.
If the table does have a primary or foreign key constraint, the JOINS will be shown.
If you are able to locate a table in your database that has a primary or foreign key constraint, you will be able to load it into the SQL Modeler and it will auto join.
To clarify whether the table in question has a primary constraint.
Log in to SQL Plus and run the query below.
Change the OWNER in to reflect the proper OWNER.
This query will display all the constraints and display if it is disabled or enabled.
select OWNER,
TABLE_NAME,
CONSTRAINT_NAME,
decode(CONSTRAINT_TYPE, 'C','Check',
'P','Primary Key',
'U','Unique',
'R','Foreign Key',
'V','With Check Option') type,
STATUS
from dba_constraints
where OWNER = 'DP'
and TABLE_NAME = â??AP_INVOICES_ALLâ??
order by OWNER, TABLE_NAME, CONSTRAINT_NAME
Additional Information:
Below is a quick test to give to see joins.
Create these two simple tables, EMP and DEPT.
Confirm if you are able to see the relationship (JOINS) via the Schema Browser | right click on the Table DEPT and select Model Table for Query.
This will load DEPT and EMP up the Sql Modeler window.
This is one table:
CREATE TABLE DEPT
(
DEPTNO NUMBER(2),
DNAME VARCHAR2(14 BYTE),
LOC VARCHAR2(13 BYTE)
)
TABLESPACE SYSTEM
PCTUSED 40
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 12K
NEXT 12K
MINEXTENTS 1
MAXEXTENTS 249
PCTINCREASE 50
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT
)
LOGGING
NOCACHE
NOPARALLEL;
ALTER TABLE DEPT ADD (
CHECK ("DEPTNO" IS NOT NULL) DISABLE);
ALTER TABLE DEPT ADD (
CONSTRAINT DEPT_PRIMARY_KEY PRIMARY KEY (DEPTNO) DISABLE);
This is the other table:
CREATE TABLE EMP
(
EMPNO NUMBER(13),
ENAME VARCHAR2(10 BYTE),
JOB VARCHAR2(9 BYTE),
MGR NUMBER(4),
HIREDATE DATE,
SAL NUMBER(7,2),
COMM NUMBER(7,2),
DEPTNO NUMBER(2),
FIREDATE DATE
)
TABLESPACE SYSTEM
PCTUSED 40
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 12K
NEXT 12K
MINEXTENTS 1
MAXEXTENTS 249
PCTINCREASE 50
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT
)
LOGGING
NOCACHE
NOPARALLEL;
ALTER TABLE EMP ADD (
CHECK ("EMPNO" IS NOT NULL) DISABLE);
ALTER TABLE EMP ADD (
CHECK ("DEPTNO" IS NOT NULL) DISABLE);
ALTER TABLE EMP ADD (
CHECK ("FIREDATE" IS NOT NULL) DISABLE);
ALTER TABLE EMP ADD (
CONSTRAINT EMP_EMPNO_PK PRIMARY KEY (EMPNO) DISABLE);
ALTER TABLE EMP ADD (
CONSTRAINT EMP_DEPTNO_FK FOREIGN KEY (DEPTNO)
REFERENCES DEPT (DEPTNO) DISABLE);
ALTER TABLE EMP ADD (
CONSTRAINT EMP_MGR_FK FOREIGN KEY (MGR)
REFERENCES EMP (EMPNO) DISABLE);
**************************************************************
© 2021 Quest Software Inc. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy