-- SQL to get Class Data Vi_ItemMaster
SELECT 
   x.pname    Class_Namet,
   pom.pname  pom_AttrName_inTc_Class,
   pc.PTNAME  AttrData_inTbl,
   pom.PDBNAME pom_AttrData_InTbl_Colume
FROM
  (SELECT level sortx,
    connect_by_root(pname) classes,
    pname
   FROM infodba.ppom_class pc
   WHERE pc.pname like 'Vi_%'
    CONNECT BY nocycle prior pc.pname = pc.psuperclass
   ORDER BY level DESC
  ) x,
  infodba.ppom_attribute pom,
  infodba.ppom_class pc
WHERE x.classes = pc.pname
AND pc.puid     = pom.rdefining_classu 
AND pom.pname like 'Vi_SAP%'
AND x.pname like 'Vi_ItemMaster' ;

-- 2nd migration form data Vi_MAW_MigForm
SELECT 
   x.pname    Class_Namet,
   pom.pname  pom_AttrName_inTc_Class,
   pc.PTNAME  AttrData_inTbl,
   pom.PDBNAME pom_AttrData_InTbl_Colume
FROM
  (SELECT level sortx,
    connect_by_root(pname) classes, pname
   FROM infodba.ppom_class pc
   -- WHERE pc.pname like '%M%'
    CONNECT BY nocycle prior pc.pname = pc.psuperclass
   ORDER BY level DESC
  ) x,
  infodba.ppom_attribute pom,
  infodba.ppom_class pc
WHERE x.classes = pc.pname
AND pc.puid     = pom.rdefining_classu 
AND x.pname like 'Vi_MAW%'
AND pom.pname like 'MK_%'
AND pc.PTNAME like 'PVI_MAW_%'
AND pom.PDBNAME like 'pMK%' ;
