Thursday, July 30, 2015

SQL Query to identify the record's of a component

SELECT DISTINCT D.recname     TableName,
                D.occurslevel ScrollName
FROM   pspnlgrpdefn A,
       pspnlgroup B,
       pspnldefn C,
       pspnlfield D,
       psrecdefn E
WHERE  A.pnlgrpname = B.pnlgrpname
       AND A.market = B.market
       AND B.pnlname = C.pnlname
       AND C.pnlname = D.pnlname
       AND A.pnlgrpname = 'JOB_DATA'
       AND E.recname = D.recname
              AND E.rectype IN ( 0 )
              AND To_char(Bitand(D.fielduse, 16)) <> '16'
ORDER  BY 2,1 

No comments:

Post a Comment