Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

find missing data from parent table

899401Aug 8 2013 — edited Aug 8 2013

hI,

PLEASE IGNORE ABOVE STATEMENT JUST NOW GOT THE RESULTS

SELECT c.table_name CHILD_TABLE, p.table_name PARENT_TABLE

FROM user_constraints p, user_constraints c

WHERE (p.constraint_type = 'P' OR p.constraint_type = 'U')

AND c.constraint_type = 'R'

AND p.constraint_name = c.r_constraint_name

AND c.table_name = UPPER('ODS_TSAF_MES_PC');

and output is

child table                     parent table

ODS_TSAF_MES_PCODS_TSAF_MES_PCTYP
ODS_TSAF_MES_PCODS_TSAF_MES_PC
ODS_TSAF_MES_PCODS_TSAF_MES_PCSTAT

i tried

SELECT A.piecestatus from ods_TSAF_MES_PCSTAT  A WHERE NOT EXISTS

   (SELECT * FROM ODS_TSAF_MES_PC B WHERE B.piecestatus = A.piecestatus);

and i found one piecestatus values is 'I' but i am not getting where it is related to the table  and in which row it is getting affected?

want to know which row is getting affected

thanks

This post has been answered by Ishan on Aug 8 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 5 2013
Added on Aug 8 2013
6 comments
1,296 views