CREATE VIEW TCMETACLASSVIEW AS 
  SELECT
    a.*,
    f.name as adName,
    b.attrMask,
    b.cHppPassText,
    b.cCppPassText,
    b.sHppPassText,
    b.sCppPassText,
    l.label,
    l.contents,
    q.adName as adName1,
    q.attribType,
    q.attrTypeLen,
    q.attrMask as attrMask1,
    v.methodNames,
    ab.label as label1,
    ab.contents as contents1,
    ah.adName as adName2,
    ah.attribType as attribType1,
    ah.attrTypeLen as attrTypeLen1,
    ah.attrMask as attrMask2,
    ag.relRetClass,
    ag.relSubsysName,
    ag.invRelClassSbsysNm,
    ag.relInvRel,
    ag.relClass,
    ag.minValue,
    ag.maxValue,
    ag.relCard,
    al.attribSrcTgt,
    au.name as adName3,
    bd.name as adName4,
    bj.adName as adName5,
    bj.attribType as attribType2,
    bj.attrTypeLen as attrTypeLen2,
    bj.attrMask as attrMask3,
    bk.relRetClass as relRetClass1,
    bk.invRelClassSbsysNm as invRelClssSbsysNm1,
    bk.relInvRel as relInvRel1,
    bk.relClass as relClass1,
    bk.minValue as minValue1,
    bk.maxValue as maxValue1,
    bk.relCard as relCard1,
    bi.attribSrcTgt as attribSrcTgt1,
    bp.adName as adName6,
    bp.attribType as attribType3,
    bp.attrTypeLen as attrTypeLen3,
    bp.attrMask as attrMask4,
    bo.relRetClass as relRetClass2,
    bo.relSubsysName as relSubsysName1,
    bo.relInvRel as relInvRel2,
    bo.relClass as relClass2,
    bo.minValue as minValue2,
    bo.maxValue as maxValue2,
    bo.relCard as relCard2,
    bo.invRelClassSbsysNm as invRelClssSbsysNm2,
    bx.name as adName7,
    cf.name as adName8,
    cl.label as label2,
    cl.contents as contents2,
    cq.adName as adName9,
    cq.methodRetType,
    cq.methodParms,
    cq.attrMask as attrMask5,
    cw.label as label3,
    cw.contents as contents3,
    db.methodNames as methodNames1,
    db.constraintMask,
    dh.label as label4,
    dh.contents as contents4,
    dm.methodNames as methodNames2,
    ds.label as label5,
    ds.contents as contents5
  FROM
    OIDOVers a
    INNER JOIN TCMetaClass_versin b ON a.OID=b.OID AND a.OVer=b.OVer
    LEFT OUTER JOIN TCVersionClass d ON d.OID=b.OID AND d.OVer=b.OVer
    LEFT OUTER JOIN TCSourceObject e ON e.OID=d.osrelTCSourceObjct
    LEFT OUTER JOIN ADLink_source m ON m.classAttr='TCMetaClass_version.pAttribs' AND
      m.sourceOID=b.OID AND m.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind n ON n.OID=m.relOID AND n.OVer=m.relOVer AND
       n.className='TCMetaToAttribs' AND
       n.contextRelease=a.contextRelease AND n.contextName=a.contextName
    LEFT OUTER JOIN ADLink o ON o.OID=n.OID AND o.OVer=n.OVer
    LEFT OUTER JOIN ADLink_source ac ON ac.classAttr='TCMetaClass_version.pRels' AND
      ac.sourceOID=b.OID AND ac.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind ad ON ad.OID=ac.relOID AND ad.OVer=ac.relOVer AND
       ad.className='TCMetaToRels' AND
       ad.contextRelease=a.contextRelease AND ad.contextName=a.contextName
    LEFT OUTER JOIN ADLink ae ON ae.OID=ad.OID AND ae.OVer=ad.OVer
    LEFT OUTER JOIN ADLink_source cm ON cm.classAttr='TCMetaClass_version.pMethods' AND
      cm.sourceOID=b.OID AND cm.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind cn ON cn.OID=cm.relOID AND cn.OVer=cm.relOVer AND
       cn.className='TCMetaToMethods' AND
       cn.contextRelease=a.contextRelease AND cn.contextName=a.contextName
    LEFT OUTER JOIN ADLink co ON co.OID=cn.OID AND co.OVer=cn.OVer
    LEFT OUTER JOIN ADLink_source cx ON cx.classAttr='TCMetaClass_version.pConstraints' AND
      cx.sourceOID=b.OID AND cx.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind cy ON cy.OID=cx.relOID AND cy.OVer=cx.relOVer AND
       cy.className='TCMetaToClassConstraints' AND
       cy.contextRelease=a.contextRelease AND cy.contextName=a.contextName
    LEFT OUTER JOIN ADLink cz ON cz.OID=cy.OID AND cz.OVer=cy.OVer
    LEFT OUTER JOIN ADLink_source di ON di.classAttr='TCMetaClass_version.pAttrConstraints' AND
      di.sourceOID=b.OID AND di.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind dj ON dj.OID=di.relOID AND dj.OVer=di.relOVer AND
       dj.className='TCMetaToAttrConstraints' AND
       dj.contextRelease=a.contextRelease AND dj.contextName=a.contextName
    LEFT OUTER JOIN ADLink dk ON dk.OID=dj.OID AND dk.OVer=dj.OVer
    LEFT OUTER JOIN FHCPath f ON f.OID=e.osrelNuPathId
    INNER JOIN ADObject g ON g.OID=b.OID AND g.OVer=b.OVer AND
     g.className='TCMetaClass_version'
    LEFT OUTER JOIN adobjectFind p ON p.OID=o.adTarget AND
       p.className='TCAttribute' AND
       p.contextRelease=a.contextRelease AND p.contextName=a.contextName
    LEFT OUTER JOIN adobjectFind af ON af.OID=ae.adTarget AND
       af.className='TCRelationship' AND
       af.contextRelease=a.contextRelease AND af.contextName=a.contextName
    LEFT OUTER JOIN adobjectFind cp ON cp.OID=co.adTarget AND
       cp.className='TCMethod' AND
       cp.contextRelease=a.contextRelease AND cp.contextName=a.contextName
    LEFT OUTER JOIN adobjectFind da ON da.OID=cz.adTarget AND
       da.className='TCClassConstraint' AND
       da.contextRelease=a.contextRelease AND da.contextName=a.contextName
    LEFT OUTER JOIN adobjectFind dl ON dl.OID=dk.adTarget AND
       dl.className='TCAttrConstraint' AND
       dl.contextRelease=a.contextRelease AND dl.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source h ON h.classAttr='ADAnnotatedObject.pAnnotationText' AND
      h.sourceOID=g.OID AND h.sourceOVer=g.OVer
    LEFT OUTER JOIN adobjectFind i ON i.OID=h.relOID AND i.OVer=h.relOVer AND
       i.className='ADLinkADAnnotObj2AnnotTxt' AND
       i.contextRelease=a.contextRelease AND i.contextName=a.contextName
    LEFT OUTER JOIN ADLink j ON j.OID=i.OID AND j.OVer=i.OVer
    LEFT OUTER JOIN TCAttribute q ON q.OID=p.OID AND q.OVer=p.OVer
    LEFT OUTER JOIN TCRelationship ag ON ag.OID=af.OID AND ag.OVer=af.OVer
    LEFT OUTER JOIN TCAttribute ah ON ah.OID=ag.OID AND ah.OVer=ag.OVer
    LEFT OUTER JOIN TCMethod cq ON cq.OID=cp.OID AND cq.OVer=cp.OVer
    LEFT OUTER JOIN ADObject cr ON cr.OID=cq.OID AND cr.OVer=cq.OVer AND
     cr.className='TCMethod'
    LEFT OUTER JOIN TCClassConstraint db ON db.OID=da.OID AND db.OVer=da.OVer
    LEFT OUTER JOIN ADObject dc ON dc.OID=db.OID AND dc.OVer=db.OVer AND
     dc.className='TCClassConstraint'
    LEFT OUTER JOIN TCAttrConstraint dm ON dm.OID=dl.OID AND dm.OVer=dl.OVer
    LEFT OUTER JOIN ADObject dn ON dn.OID=dm.OID AND dn.OVer=dm.OVer AND
     dn.className='TCAttrConstraint'
    LEFT OUTER JOIN adobjectFind k ON k.OID=j.adTarget AND
       k.className='ADAnnotationText' AND
       k.contextRelease=a.contextRelease AND k.contextName=a.contextName
    LEFT OUTER JOIN ADLink_target r ON r.classAttr='TCAttribute.pAttrConstraint' AND
      r.targetOID=q.OID AND r.targetOVer=q.OVer
    LEFT OUTER JOIN adobjectFind s ON s.OID=r.relOID AND s.OVer=r.relOVer AND
       s.className='TCConstraintToAttr' AND
       s.contextRelease=a.contextRelease AND s.contextName=a.contextName
    LEFT OUTER JOIN ADLink t ON t.OID=s.OID AND t.OVer=s.OVer
    LEFT OUTER JOIN adobjectFind ai ON ai.OID=ag.pRelSrcTgt AND
       ai.className='TCRelToSrcTgt' AND
       ai.contextRelease=a.contextRelease AND ai.contextName=a.contextName
    LEFT OUTER JOIN ADLink aj ON aj.OID=ai.OID AND aj.OVer=ai.OVer
    LEFT OUTER JOIN ADLink_source cs ON cs.classAttr='ADAnnotatedObject.pAnnotationText' AND
      cs.sourceOID=cr.OID AND cs.sourceOVer=cr.OVer
    LEFT OUTER JOIN adobjectFind ct ON ct.OID=cs.relOID AND ct.OVer=cs.relOVer AND
       ct.className='ADLinkADAnnotObj2AnnotTxt' AND
       ct.contextRelease=a.contextRelease AND ct.contextName=a.contextName
    LEFT OUTER JOIN ADLink cu ON cu.OID=ct.OID AND cu.OVer=ct.OVer
    LEFT OUTER JOIN ADLink_source dd ON dd.classAttr='ADAnnotatedObject.pAnnotationText' AND
      dd.sourceOID=dc.OID AND dd.sourceOVer=dc.OVer
    LEFT OUTER JOIN adobjectFind de ON de.OID=dd.relOID AND de.OVer=dd.relOVer AND
       de.className='ADLinkADAnnotObj2AnnotTxt' AND
       de.contextRelease=a.contextRelease AND de.contextName=a.contextName
    LEFT OUTER JOIN ADLink df ON df.OID=de.OID AND df.OVer=de.OVer
    LEFT OUTER JOIN ADLink_source do ON do.classAttr='ADAnnotatedObject.pAnnotationText' AND
      do.sourceOID=dn.OID AND do.sourceOVer=dn.OVer
    LEFT OUTER JOIN adobjectFind dp ON dp.OID=do.relOID AND dp.OVer=do.relOVer AND
       dp.className='ADLinkADAnnotObj2AnnotTxt' AND
       dp.contextRelease=a.contextRelease AND dp.contextName=a.contextName
    LEFT OUTER JOIN ADLink dq ON dq.OID=dp.OID AND dq.OVer=dp.OVer
    LEFT OUTER JOIN ADAnnotationText l ON l.OID=k.OID AND l.OVer=k.OVer
    LEFT OUTER JOIN adobjectFind u ON u.OID=t.adSource AND
       u.className='TCAttrConstraint' AND
       u.contextRelease=a.contextRelease AND u.contextName=a.contextName
    LEFT OUTER JOIN adobjectFind ak ON ak.OID=aj.adSource AND
       ak.className='TCSrcTgtAttr' AND
       ak.contextRelease=a.contextRelease AND ak.contextName=a.contextName
    LEFT OUTER JOIN adobjectFind cv ON cv.OID=cu.adTarget AND
       cv.className='ADAnnotationText' AND
       cv.contextRelease=a.contextRelease AND cv.contextName=a.contextName
    LEFT OUTER JOIN adobjectFind dg ON dg.OID=df.adTarget AND
       dg.className='ADAnnotationText' AND
       dg.contextRelease=a.contextRelease AND dg.contextName=a.contextName
    LEFT OUTER JOIN adobjectFind dr ON dr.OID=dq.adTarget AND
       dr.className='ADAnnotationText' AND
       dr.contextRelease=a.contextRelease AND dr.contextName=a.contextName
    LEFT OUTER JOIN TCAttrConstraint v ON v.OID=u.OID AND v.OVer=u.OVer
    LEFT OUTER JOIN ADObject w ON w.OID=q.OID AND w.OVer=q.OVer AND
     w.className='TCAttribute'
    LEFT OUTER JOIN TCSrcTgtAttr al ON al.OID=ak.OID AND al.OVer=ak.OVer
    LEFT OUTER JOIN ADAnnotationText cw ON cw.OID=cv.OID AND cw.OVer=cv.OVer
    LEFT OUTER JOIN ADAnnotationText dh ON dh.OID=dg.OID AND dh.OVer=dg.OVer
    LEFT OUTER JOIN ADAnnotationText ds ON ds.OID=dr.OID AND ds.OVer=dr.OVer
    LEFT OUTER JOIN ADLink_source x ON x.classAttr='ADAnnotatedObject.pAnnotationText' AND
      x.sourceOID=w.OID AND x.sourceOVer=w.OVer
    LEFT OUTER JOIN adobjectFind y ON y.OID=x.relOID AND y.OVer=x.relOVer AND
       y.className='ADLinkADAnnotObj2AnnotTxt' AND
       y.contextRelease=a.contextRelease AND y.contextName=a.contextName
    LEFT OUTER JOIN ADLink z ON z.OID=y.OID AND z.OVer=y.OVer
    LEFT OUTER JOIN adobjectFind am ON am.OID=al.pRelMetaClass AND
       am.className='TCRelMetaToSrcTgt' AND
       am.contextRelease=a.contextRelease AND am.contextName=a.contextName
    LEFT OUTER JOIN ADLink an ON an.OID=am.OID AND an.OVer=am.OVer
    LEFT OUTER JOIN adobjectFind aa ON aa.OID=z.adTarget AND
       aa.className='ADAnnotationText' AND
       aa.contextRelease=a.contextRelease AND aa.contextName=a.contextName
    LEFT OUTER JOIN OIDOVers ao ON ao.OID=an.adSource AND  ao.contextOID=a.contextOID
    LEFT OUTER JOIN ADObject ap ON ap.OID=an.adSource AND ap.OVer=ao.OVer AND
     ap.className='TCRelMetaClass_version'
    LEFT OUTER JOIN TCVersionClass ar ON ar.OID=ap.OID AND ar.OVer=ap.OVer
    LEFT OUTER JOIN ADAnnotationText ab ON ab.OID=aa.OID AND ab.OVer=aa.OVer
    LEFT OUTER JOIN TCSourceObject at ON at.OID=ar.osrelTCSourceObjct
    LEFT OUTER JOIN ADLink_source be ON be.classAttr='TCRelMetaClass_version.pSrcTgt' AND
      be.sourceOID=ap.OID AND be.sourceOVer=ap.OVer
    LEFT OUTER JOIN adobjectFind bf ON bf.OID=be.relOID AND bf.OVer=be.relOVer AND
       bf.className='TCRelMetaToSrcTgt' AND
       bf.contextRelease=a.contextRelease AND bf.contextName=a.contextName
    LEFT OUTER JOIN ADLink bg ON bg.OID=bf.OID AND bg.OVer=bf.OVer
    LEFT OUTER JOIN FHCPath au ON au.OID=at.osrelNuPathId
    LEFT OUTER JOIN TCMetaClass_versin av ON av.OID=ap.OID AND av.OVer=ap.OVer
    LEFT OUTER JOIN adobjectFind bh ON bh.OID=bg.adTarget AND
       bh.className='TCSrcTgtAttr' AND
       bh.contextRelease=a.contextRelease AND bh.contextName=a.contextName
    LEFT OUTER JOIN adobjectFind aw ON aw.OID=av.pMetaToSys AND
       aw.className='TCSubsysToMeta' AND
       aw.contextRelease=a.contextRelease AND aw.contextName=a.contextName
    LEFT OUTER JOIN ADLink ax ON ax.OID=aw.OID AND ax.OVer=aw.OVer
    LEFT OUTER JOIN TCSrcTgtAttr bi ON bi.OID=bh.OID AND bi.OVer=bh.OVer
    LEFT OUTER JOIN TCAttribute bj ON bj.OID=bi.OID AND bj.OVer=bi.OVer
    LEFT OUTER JOIN TCRelationship bk ON bk.OID=bi.OID AND bk.OVer=bi.OVer
    LEFT OUTER JOIN OIDOVers ay ON ay.OID=ax.adTarget AND  ay.contextOID=a.contextOID
    LEFT OUTER JOIN TCVersionClass bb ON bb.OID=ax.adTarget AND bb.OVer=ax.OVer
    LEFT OUTER JOIN adobjectFind bl ON bl.OID=bi.pSrcTgtRel AND
       bl.className='TCRelToSrcTgt' AND
       bl.contextRelease=a.contextRelease AND bl.contextName=a.contextName
    LEFT OUTER JOIN ADLink bm ON bm.OID=bl.OID AND bm.OVer=bl.OVer
    LEFT OUTER JOIN TCSourceObject bc ON bc.OID=bb.osrelTCSourceObjct
    LEFT OUTER JOIN adobjectFind bn ON bn.OID=bm.adTarget AND
       bn.className='TCRelationship' AND
       bn.contextRelease=a.contextRelease AND bn.contextName=a.contextName
    LEFT OUTER JOIN FHCPath bd ON bd.OID=bc.osrelNuPathId
    LEFT OUTER JOIN TCRelationship bo ON bo.OID=bn.OID AND bo.OVer=bn.OVer
    LEFT OUTER JOIN TCAttribute bp ON bp.OID=bo.OID AND bp.OVer=bo.OVer
    LEFT OUTER JOIN adobjectFind bq ON bq.OID=bo.pRelsMClass AND
       bq.className='TCMetaToRels' AND
       bq.contextRelease=a.contextRelease AND bq.contextName=a.contextName
    LEFT OUTER JOIN ADLink br ON br.OID=bq.OID AND br.OVer=bq.OVer
    LEFT OUTER JOIN OIDOVers bs ON bs.OID=br.adSource AND  bs.contextOID=a.contextOID
    LEFT OUTER JOIN TCMetaClass_versin bt ON bt.OID=br.adSource AND bt.OVer=bs.OVer
    LEFT OUTER JOIN TCVersionClass bv ON bv.OID=bt.OID AND bv.OVer=bt.OVer
    LEFT OUTER JOIN TCSourceObject bw ON bw.OID=bv.osrelTCSourceObjct
    LEFT OUTER JOIN adobjectFind by ON by.OID=bt.pMetaToSys AND
       by.className='TCSubsysToMeta' AND
       by.contextRelease=a.contextRelease AND by.contextName=a.contextName
    LEFT OUTER JOIN ADLink bz ON bz.OID=by.OID AND bz.OVer=by.OVer
    LEFT OUTER JOIN FHCPath bx ON bx.OID=bw.osrelNuPathId
    LEFT OUTER JOIN OIDOVers ca ON ca.OID=bz.adTarget AND  ca.contextOID=a.contextOID
    LEFT OUTER JOIN TCVersionClass cd ON cd.OID=bz.adTarget AND cd.OVer=bz.OVer
    LEFT OUTER JOIN TCSourceObject ce ON ce.OID=cd.osrelTCSourceObjct
    LEFT OUTER JOIN FHCPath cf ON cf.OID=ce.osrelNuPathId
    LEFT OUTER JOIN ADObject cg ON cg.OID=ag.OID AND cg.OVer=ag.OVer AND
     cg.className='TCRelationship'
    LEFT OUTER JOIN ADLink_source ch ON ch.classAttr='ADAnnotatedObject.pAnnotationText' AND
      ch.sourceOID=cg.OID AND ch.sourceOVer=cg.OVer
    LEFT OUTER JOIN adobjectFind ci ON ci.OID=ch.relOID AND ci.OVer=ch.relOVer AND
       ci.className='ADLinkADAnnotObj2AnnotTxt' AND
       ci.contextRelease=a.contextRelease AND ci.contextName=a.contextName
    LEFT OUTER JOIN ADLink cj ON cj.OID=ci.OID AND cj.OVer=ci.OVer
    LEFT OUTER JOIN adobjectFind ck ON ck.OID=cj.adTarget AND
       ck.className='ADAnnotationText' AND
       ck.contextRelease=a.contextRelease AND ck.contextName=a.contextName
    LEFT OUTER JOIN ADAnnotationText cl ON cl.OID=ck.OID AND cl.OVer=ck.OVer;

CREATE VIEW TCRELMETACLASSVIEW AS 
  SELECT
    a.*,
    f.name as adName,
    g.attrMask,
    g.cHppPassText,
    g.cCppPassText,
    g.sHppPassText,
    g.sCppPassText,
    m.label,
    m.contents,
    r.adName as adName1,
    r.attribType,
    r.attrTypeLen,
    r.attrMask as attrMask1,
    w.methodNames,
    ac.label as label1,
    ac.contents as contents1,
    ai.adName as adName2,
    ai.attribType as attribType1,
    ai.attrTypeLen as attrTypeLen1,
    ai.attrMask as attrMask2,
    ah.relRetClass,
    ah.relSubsysName,
    ah.invRelClassSbsysNm,
    ah.relInvRel,
    ah.relClass,
    ah.minValue,
    ah.maxValue,
    ah.relCard,
    am.attribSrcTgt,
    at.label as label2,
    at.contents as contents2,
    ay.adName as adName3,
    ay.methodRetType,
    ay.methodParms,
    ay.attrMask as attrMask3,
    be.label as label3,
    be.contents as contents3,
    bk.adName as adName4,
    bk.attribType as attribType2,
    bk.attrTypeLen as attrTypeLen2,
    bk.attrMask as attrMask4,
    bl.relRetClass as relRetClass1,
    bl.invRelClassSbsysNm as invRelClssSbsysNm1,
    bl.relInvRel as relInvRel1,
    bl.relClass as relClass1,
    bl.minValue as minValue1,
    bl.maxValue as maxValue1,
    bl.relCard as relCard1,
    bj.attribSrcTgt as attribSrcTgt1,
    bq.adName as adName5,
    bq.attribType as attribType3,
    bq.attrTypeLen as attrTypeLen3,
    bq.attrMask as attrMask5,
    bp.relRetClass as relRetClass2,
    bp.relSubsysName as relSubsysName1,
    bp.relInvRel as relInvRel2,
    bp.relClass as relClass2,
    bp.minValue as minValue2,
    bp.maxValue as maxValue2,
    bp.relCard as relCard2,
    bw.label as label7,
    bw.contents as contents7,
    ce.name as adName6,
    cm.name as adName7,
    cs.label as label4,
    cs.contents as contents4,
    cx.methodNames as methodNames1,
    cx.constraintMask,
    dd.label as label5,
    dd.contents as contents5,
    di.methodNames as methodNames2,
    do.label as label6,
    do.contents as contents6
  FROM
    OIDOVers a
    INNER JOIN ADObject b ON a.OID=b.OID AND a.OVer=b.OVer AND
 b.className='TCRelMetaClass_version'
    LEFT OUTER JOIN TCVersionClass d ON d.OID=b.OID AND d.OVer=b.OVer
    LEFT OUTER JOIN TCSourceObject e ON e.OID=d.osrelTCSourceObjct
    LEFT OUTER JOIN ADLink_source bf ON bf.classAttr='TCRelMetaClass_version.pSrcTgt' AND
      bf.sourceOID=b.OID AND bf.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind bg ON bg.OID=bf.relOID AND bg.OVer=bf.relOVer AND
       bg.className='TCRelMetaToSrcTgt' AND
       bg.contextRelease=a.contextRelease AND bg.contextName=a.contextName
    LEFT OUTER JOIN ADLink bh ON bh.OID=bg.OID AND bh.OVer=bg.OVer
    LEFT OUTER JOIN FHCPath f ON f.OID=e.osrelNuPathId
    INNER JOIN TCMetaClass_versin g ON g.OID=b.OID AND g.OVer=b.OVer
    INNER JOIN ADObject h ON h.OID=b.OID AND h.OVer=b.OVer AND
     h.className='TCRelMetaClass_version'
    LEFT OUTER JOIN adobjectFind bi ON bi.OID=bh.adTarget AND
       bi.className='TCSrcTgtAttr' AND
       bi.contextRelease=a.contextRelease AND bi.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source i ON i.classAttr='ADAnnotatedObject.pAnnotationText' AND
      i.sourceOID=h.OID AND i.sourceOVer=h.OVer
    LEFT OUTER JOIN adobjectFind j ON j.OID=i.relOID AND j.OVer=i.relOVer AND
       j.className='ADLinkADAnnotObj2AnnotTxt' AND
       j.contextRelease=a.contextRelease AND j.contextName=a.contextName
    LEFT OUTER JOIN ADLink k ON k.OID=j.OID AND k.OVer=j.OVer
    LEFT OUTER JOIN ADLink_source n ON n.classAttr='TCMetaClass_version.pAttribs' AND
      n.sourceOID=g.OID AND n.sourceOVer=g.OVer
    LEFT OUTER JOIN adobjectFind o ON o.OID=n.relOID AND o.OVer=n.relOVer AND
       o.className='TCMetaToAttribs' AND
       o.contextRelease=a.contextRelease AND o.contextName=a.contextName
    LEFT OUTER JOIN ADLink p ON p.OID=o.OID AND p.OVer=o.OVer
    LEFT OUTER JOIN ADLink_source ad ON ad.classAttr='TCMetaClass_version.pRels' AND
      ad.sourceOID=g.OID AND ad.sourceOVer=g.OVer
    LEFT OUTER JOIN adobjectFind ae ON ae.OID=ad.relOID AND ae.OVer=ad.relOVer AND
       ae.className='TCMetaToRels' AND
       ae.contextRelease=a.contextRelease AND ae.contextName=a.contextName
    LEFT OUTER JOIN ADLink af ON af.OID=ae.OID AND af.OVer=ae.OVer
    LEFT OUTER JOIN ADLink_source au ON au.classAttr='TCMetaClass_version.pMethods' AND
      au.sourceOID=g.OID AND au.sourceOVer=g.OVer
    LEFT OUTER JOIN adobjectFind av ON av.OID=au.relOID AND av.OVer=au.relOVer AND
       av.className='TCMetaToMethods' AND
       av.contextRelease=a.contextRelease AND av.contextName=a.contextName
    LEFT OUTER JOIN ADLink aw ON aw.OID=av.OID AND aw.OVer=av.OVer
    LEFT OUTER JOIN TCSrcTgtAttr bj ON bj.OID=bi.OID AND bj.OVer=bi.OVer
    LEFT OUTER JOIN TCAttribute bk ON bk.OID=bj.OID AND bk.OVer=bj.OVer
    LEFT OUTER JOIN TCRelationship bl ON bl.OID=bj.OID AND bl.OVer=bj.OVer
    LEFT OUTER JOIN ADLink_source ct ON ct.classAttr='TCMetaClass_version.pConstraints' AND
      ct.sourceOID=g.OID AND ct.sourceOVer=g.OVer
    LEFT OUTER JOIN adobjectFind cu ON cu.OID=ct.relOID AND cu.OVer=ct.relOVer AND
       cu.className='TCMetaToClassConstraints' AND
       cu.contextRelease=a.contextRelease AND cu.contextName=a.contextName
    LEFT OUTER JOIN ADLink cv ON cv.OID=cu.OID AND cv.OVer=cu.OVer
    LEFT OUTER JOIN ADLink_source de ON de.classAttr='TCMetaClass_version.pAttrConstraints' AND
      de.sourceOID=g.OID AND de.sourceOVer=g.OVer
    LEFT OUTER JOIN adobjectFind df ON df.OID=de.relOID AND df.OVer=de.relOVer AND
       df.className='TCMetaToAttrConstraints' AND
       df.contextRelease=a.contextRelease AND df.contextName=a.contextName
    LEFT OUTER JOIN ADLink dg ON dg.OID=df.OID AND dg.OVer=df.OVer
    LEFT OUTER JOIN adobjectFind l ON l.OID=k.adTarget AND
       l.className='ADAnnotationText' AND
       l.contextRelease=a.contextRelease AND l.contextName=a.contextName
    LEFT OUTER JOIN adobjectFind q ON q.OID=p.adTarget AND
       q.className='TCAttribute' AND
       q.contextRelease=a.contextRelease AND q.contextName=a.contextName
    LEFT OUTER JOIN adobjectFind ag ON ag.OID=af.adTarget AND
       ag.className='TCRelationship' AND
       ag.contextRelease=a.contextRelease AND ag.contextName=a.contextName
    LEFT OUTER JOIN adobjectFind ax ON ax.OID=aw.adTarget AND
       ax.className='TCMethod' AND
       ax.contextRelease=a.contextRelease AND ax.contextName=a.contextName
    LEFT OUTER JOIN adobjectFind bm ON bm.OID=bj.pSrcTgtRel AND
       bm.className='TCRelToSrcTgt' AND
       bm.contextRelease=a.contextRelease AND bm.contextName=a.contextName
    LEFT OUTER JOIN ADLink bn ON bn.OID=bm.OID AND bn.OVer=bm.OVer
    LEFT OUTER JOIN adobjectFind cw ON cw.OID=cv.adTarget AND
       cw.className='TCClassConstraint' AND
       cw.contextRelease=a.contextRelease AND cw.contextName=a.contextName
    LEFT OUTER JOIN adobjectFind dh ON dh.OID=dg.adTarget AND
       dh.className='TCAttrConstraint' AND
       dh.contextRelease=a.contextRelease AND dh.contextName=a.contextName
    LEFT OUTER JOIN ADAnnotationText m ON m.OID=l.OID AND m.OVer=l.OVer
    LEFT OUTER JOIN TCAttribute r ON r.OID=q.OID AND r.OVer=q.OVer
    LEFT OUTER JOIN TCRelationship ah ON ah.OID=ag.OID AND ah.OVer=ag.OVer
    LEFT OUTER JOIN TCAttribute ai ON ai.OID=ah.OID AND ai.OVer=ah.OVer
    LEFT OUTER JOIN TCMethod ay ON ay.OID=ax.OID AND ay.OVer=ax.OVer
    LEFT OUTER JOIN ADObject az ON az.OID=ay.OID AND az.OVer=ay.OVer AND
     az.className='TCMethod'
    LEFT OUTER JOIN adobjectFind bo ON bo.OID=bn.adTarget AND
       bo.className='TCRelationship' AND
       bo.contextRelease=a.contextRelease AND bo.contextName=a.contextName
    LEFT OUTER JOIN TCClassConstraint cx ON cx.OID=cw.OID AND cx.OVer=cw.OVer
    LEFT OUTER JOIN ADObject cy ON cy.OID=cx.OID AND cy.OVer=cx.OVer AND
     cy.className='TCClassConstraint'
    LEFT OUTER JOIN TCAttrConstraint di ON di.OID=dh.OID AND di.OVer=dh.OVer
    LEFT OUTER JOIN ADObject dj ON dj.OID=di.OID AND dj.OVer=di.OVer AND
     dj.className='TCAttrConstraint'
    LEFT OUTER JOIN ADLink_target s ON s.classAttr='TCAttribute.pAttrConstraint' AND
      s.targetOID=r.OID AND s.targetOVer=r.OVer
    LEFT OUTER JOIN adobjectFind t ON t.OID=s.relOID AND t.OVer=s.relOVer AND
       t.className='TCConstraintToAttr' AND
       t.contextRelease=a.contextRelease AND t.contextName=a.contextName
    LEFT OUTER JOIN ADLink u ON u.OID=t.OID AND u.OVer=t.OVer
    LEFT OUTER JOIN adobjectFind aj ON aj.OID=ah.pRelSrcTgt AND
       aj.className='TCRelToSrcTgt' AND
       aj.contextRelease=a.contextRelease AND aj.contextName=a.contextName
    LEFT OUTER JOIN ADLink ak ON ak.OID=aj.OID AND ak.OVer=aj.OVer
    LEFT OUTER JOIN ADLink_source ba ON ba.classAttr='ADAnnotatedObject.pAnnotationText' AND
      ba.sourceOID=az.OID AND ba.sourceOVer=az.OVer
    LEFT OUTER JOIN adobjectFind bb ON bb.OID=ba.relOID AND bb.OVer=ba.relOVer AND
       bb.className='ADLinkADAnnotObj2AnnotTxt' AND
       bb.contextRelease=a.contextRelease AND bb.contextName=a.contextName
    LEFT OUTER JOIN ADLink bc ON bc.OID=bb.OID AND bc.OVer=bb.OVer
    LEFT OUTER JOIN TCRelationship bp ON bp.OID=bo.OID AND bp.OVer=bo.OVer
    LEFT OUTER JOIN TCAttribute bq ON bq.OID=bp.OID AND bq.OVer=bp.OVer
    LEFT OUTER JOIN ADObject br ON br.OID=bp.OID AND br.OVer=bp.OVer AND
     br.className='TCRelationship'
    LEFT OUTER JOIN ADLink_source cz ON cz.classAttr='ADAnnotatedObject.pAnnotationText' AND
      cz.sourceOID=cy.OID AND cz.sourceOVer=cy.OVer
    LEFT OUTER JOIN adobjectFind da ON da.OID=cz.relOID AND da.OVer=cz.relOVer AND
       da.className='ADLinkADAnnotObj2AnnotTxt' AND
       da.contextRelease=a.contextRelease AND da.contextName=a.contextName
    LEFT OUTER JOIN ADLink db ON db.OID=da.OID AND db.OVer=da.OVer
    LEFT OUTER JOIN ADLink_source dk ON dk.classAttr='ADAnnotatedObject.pAnnotationText' AND
      dk.sourceOID=dj.OID AND dk.sourceOVer=dj.OVer
    LEFT OUTER JOIN adobjectFind dl ON dl.OID=dk.relOID AND dl.OVer=dk.relOVer AND
       dl.className='ADLinkADAnnotObj2AnnotTxt' AND
       dl.contextRelease=a.contextRelease AND dl.contextName=a.contextName
    LEFT OUTER JOIN ADLink dm ON dm.OID=dl.OID AND dm.OVer=dl.OVer
    LEFT OUTER JOIN adobjectFind v ON v.OID=u.adSource AND
       v.className='TCAttrConstraint' AND
       v.contextRelease=a.contextRelease AND v.contextName=a.contextName
    LEFT OUTER JOIN adobjectFind al ON al.OID=ak.adSource AND
       al.className='TCSrcTgtAttr' AND
       al.contextRelease=a.contextRelease AND al.contextName=a.contextName
    LEFT OUTER JOIN adobjectFind bd ON bd.OID=bc.adTarget AND
       bd.className='ADAnnotationText' AND
       bd.contextRelease=a.contextRelease AND bd.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source bs ON bs.classAttr='ADAnnotatedObject.pAnnotationText' AND
      bs.sourceOID=br.OID AND bs.sourceOVer=br.OVer
    LEFT OUTER JOIN adobjectFind bt ON bt.OID=bs.relOID AND bt.OVer=bs.relOVer AND
       bt.className='ADLinkADAnnotObj2AnnotTxt' AND
       bt.contextRelease=a.contextRelease AND bt.contextName=a.contextName
    LEFT OUTER JOIN ADLink bu ON bu.OID=bt.OID AND bu.OVer=bt.OVer
    LEFT OUTER JOIN adobjectFind bx ON bx.OID=bp.pRelsMClass AND
       bx.className='TCMetaToRels' AND
       bx.contextRelease=a.contextRelease AND bx.contextName=a.contextName
    LEFT OUTER JOIN ADLink by ON by.OID=bx.OID AND by.OVer=bx.OVer
    LEFT OUTER JOIN adobjectFind dc ON dc.OID=db.adTarget AND
       dc.className='ADAnnotationText' AND
       dc.contextRelease=a.contextRelease AND dc.contextName=a.contextName
    LEFT OUTER JOIN adobjectFind dn ON dn.OID=dm.adTarget AND
       dn.className='ADAnnotationText' AND
       dn.contextRelease=a.contextRelease AND dn.contextName=a.contextName
    LEFT OUTER JOIN TCAttrConstraint w ON w.OID=v.OID AND w.OVer=v.OVer
    LEFT OUTER JOIN ADObject x ON x.OID=r.OID AND x.OVer=r.OVer AND
     x.className='TCAttribute'
    LEFT OUTER JOIN TCSrcTgtAttr am ON am.OID=al.OID AND am.OVer=al.OVer
    LEFT OUTER JOIN ADObject an ON an.OID=ah.OID AND an.OVer=ah.OVer AND
     an.className='TCRelationship'
    LEFT OUTER JOIN ADAnnotationText be ON be.OID=bd.OID AND be.OVer=bd.OVer
    LEFT OUTER JOIN adobjectFind bv ON bv.OID=bu.adTarget AND
       bv.className='ADAnnotationText' AND
       bv.contextRelease=a.contextRelease AND bv.contextName=a.contextName
    LEFT OUTER JOIN OIDOVers bz ON bz.OID=by.adSource AND  bz.contextOID=a.contextOID
    LEFT OUTER JOIN TCMetaClass_versin ca ON ca.OID=by.adSource AND ca.OVer=bz.OVer
    LEFT OUTER JOIN TCVersionClass cc ON cc.OID=ca.OID AND cc.OVer=ca.OVer
    LEFT OUTER JOIN ADAnnotationText dd ON dd.OID=dc.OID AND dd.OVer=dc.OVer
    LEFT OUTER JOIN ADAnnotationText do ON do.OID=dn.OID AND do.OVer=dn.OVer
    LEFT OUTER JOIN ADLink_source y ON y.classAttr='ADAnnotatedObject.pAnnotationText' AND
      y.sourceOID=x.OID AND y.sourceOVer=x.OVer
    LEFT OUTER JOIN adobjectFind z ON z.OID=y.relOID AND z.OVer=y.relOVer AND
       z.className='ADLinkADAnnotObj2AnnotTxt' AND
       z.contextRelease=a.contextRelease AND z.contextName=a.contextName
    LEFT OUTER JOIN ADLink aa ON aa.OID=z.OID AND aa.OVer=z.OVer
    LEFT OUTER JOIN ADLink_source ao ON ao.classAttr='ADAnnotatedObject.pAnnotationText' AND
      ao.sourceOID=an.OID AND ao.sourceOVer=an.OVer
    LEFT OUTER JOIN adobjectFind ap ON ap.OID=ao.relOID AND ap.OVer=ao.relOVer AND
       ap.className='ADLinkADAnnotObj2AnnotTxt' AND
       ap.contextRelease=a.contextRelease AND ap.contextName=a.contextName
    LEFT OUTER JOIN ADLink aq ON aq.OID=ap.OID AND aq.OVer=ap.OVer
    LEFT OUTER JOIN ADAnnotationText bw ON bw.OID=bv.OID AND bw.OVer=bv.OVer
    LEFT OUTER JOIN TCSourceObject cd ON cd.OID=cc.osrelTCSourceObjct
    LEFT OUTER JOIN adobjectFind cf ON cf.OID=ca.pMetaToSys AND
       cf.className='TCSubsysToMeta' AND
       cf.contextRelease=a.contextRelease AND cf.contextName=a.contextName
    LEFT OUTER JOIN ADLink cg ON cg.OID=cf.OID AND cg.OVer=cf.OVer
    LEFT OUTER JOIN adobjectFind ab ON ab.OID=aa.adTarget AND
       ab.className='ADAnnotationText' AND
       ab.contextRelease=a.contextRelease AND ab.contextName=a.contextName
    LEFT OUTER JOIN adobjectFind ar ON ar.OID=aq.adTarget AND
       ar.className='ADAnnotationText' AND
       ar.contextRelease=a.contextRelease AND ar.contextName=a.contextName
    LEFT OUTER JOIN FHCPath ce ON ce.OID=cd.osrelNuPathId
    LEFT OUTER JOIN OIDOVers ch ON ch.OID=cg.adTarget AND  ch.contextOID=a.contextOID
    LEFT OUTER JOIN TCVersionClass ck ON ck.OID=cg.adTarget AND ck.OVer=cg.OVer
    LEFT OUTER JOIN ADAnnotationText ac ON ac.OID=ab.OID AND ac.OVer=ab.OVer
    LEFT OUTER JOIN ADAnnotationText at ON at.OID=ar.OID AND at.OVer=ar.OVer
    LEFT OUTER JOIN TCSourceObject cl ON cl.OID=ck.osrelTCSourceObjct
    LEFT OUTER JOIN FHCPath cm ON cm.OID=cl.osrelNuPathId
    LEFT OUTER JOIN ADObject cn ON cn.OID=bj.OID AND cn.OVer=bj.OVer AND
     cn.className='TCSrcTgtAttr'
    LEFT OUTER JOIN ADLink_source co ON co.classAttr='ADAnnotatedObject.pAnnotationText' AND
      co.sourceOID=cn.OID AND co.sourceOVer=cn.OVer
    LEFT OUTER JOIN adobjectFind cp ON cp.OID=co.relOID AND cp.OVer=co.relOVer AND
       cp.className='ADLinkADAnnotObj2AnnotTxt' AND
       cp.contextRelease=a.contextRelease AND cp.contextName=a.contextName
    LEFT OUTER JOIN ADLink cq ON cq.OID=cp.OID AND cq.OVer=cp.OVer
    LEFT OUTER JOIN adobjectFind cr ON cr.OID=cq.adTarget AND
       cr.className='ADAnnotationText' AND
       cr.contextRelease=a.contextRelease AND cr.contextName=a.contextName
    LEFT OUTER JOIN ADAnnotationText cs ON cs.OID=cr.OID AND cs.OVer=cr.OVer;

CREATE VIEW TCSubSystemClsssBs AS   -- TCSubSystemClassesBase
  SELECT
    a.*,
    f.name as adName,
    b.subsystemDll,
    b.viewCDLFiles,
    l.label,
    l.contents,
    u.name as adName1,
    q.attrMask,
    aa.label as label1,
    aa.contents as contents1
  FROM
    OIDOVers a
    INNER JOIN TCSubsystem_versin b ON a.OID=b.OID AND a.OVer=b.OVer
    LEFT OUTER JOIN TCVersionClass d ON d.OID=b.OID AND d.OVer=b.OVer
    LEFT OUTER JOIN TCSourceObject e ON e.OID=d.osrelTCSourceObjct
    LEFT OUTER JOIN ADLink_target m ON m.classAttr='TCSubsystem_version.pMetaClasses' AND
      m.targetOID=b.OID AND m.targetOVer=b.OVer
    LEFT OUTER JOIN adobjectFind n ON n.OID=m.relOID AND n.OVer=m.relOVer AND
       n.className='TCSubsysToMeta' AND
       n.contextRelease=a.contextRelease AND n.contextName=a.contextName
    LEFT OUTER JOIN ADLink o ON o.OID=n.OID AND o.OVer=n.OVer
    LEFT OUTER JOIN FHCPath f ON f.OID=e.osrelNuPathId
    INNER JOIN ADObject g ON g.OID=b.OID AND g.OVer=b.OVer AND
     g.className='TCSubsystem_version'
    LEFT OUTER JOIN OIDOVers p ON p.OID=o.adSource AND  p.contextOID=a.contextOID
    LEFT OUTER JOIN TCMetaClass_versin q ON q.OID=o.adSource AND q.OVer=p.OVer
    LEFT OUTER JOIN TCVersionClass s ON s.OID=q.OID AND s.OVer=q.OVer
    LEFT OUTER JOIN ADLink_source h ON h.classAttr='ADAnnotatedObject.pAnnotationText' AND
      h.sourceOID=g.OID AND h.sourceOVer=g.OVer
    LEFT OUTER JOIN adobjectFind i ON i.OID=h.relOID AND i.OVer=h.relOVer AND
       i.className='ADLinkADAnnotObj2AnnotTxt' AND
       i.contextRelease=a.contextRelease AND i.contextName=a.contextName
    LEFT OUTER JOIN ADLink j ON j.OID=i.OID AND j.OVer=i.OVer
    LEFT OUTER JOIN TCSourceObject t ON t.OID=s.osrelTCSourceObjct
    LEFT OUTER JOIN adobjectFind k ON k.OID=j.adTarget AND
       k.className='ADAnnotationText' AND
       k.contextRelease=a.contextRelease AND k.contextName=a.contextName
    LEFT OUTER JOIN FHCPath u ON u.OID=t.osrelNuPathId
    LEFT OUTER JOIN ADObject v ON v.OID=q.OID AND v.OVer=q.OVer AND
     v.className='TCMetaClass_version'
    LEFT OUTER JOIN ADAnnotationText l ON l.OID=k.OID AND l.OVer=k.OVer
    LEFT OUTER JOIN ADLink_source w ON w.classAttr='ADAnnotatedObject.pAnnotationText' AND
      w.sourceOID=v.OID AND w.sourceOVer=v.OVer
    LEFT OUTER JOIN adobjectFind x ON x.OID=w.relOID AND x.OVer=w.relOVer AND
       x.className='ADLinkADAnnotObj2AnnotTxt' AND
       x.contextRelease=a.contextRelease AND x.contextName=a.contextName
    LEFT OUTER JOIN ADLink y ON y.OID=x.OID AND y.OVer=x.OVer
    LEFT OUTER JOIN adobjectFind z ON z.OID=y.adTarget AND
       z.className='ADAnnotationText' AND
       z.contextRelease=a.contextRelease AND z.contextName=a.contextName
    LEFT OUTER JOIN ADAnnotationText aa ON aa.OID=z.OID AND aa.OVer=z.OVer;

CREATE VIEW TCSBYTMLSVEB AS   -- TCSUBSYSTEMCLASSVIEWBase
  SELECT
    a.*,
    f.name as adName,
    b.subsystemDll,
    b.viewCDLFiles,
    l.label,
    l.contents
  FROM
    OIDOVers a
    INNER JOIN TCSubsystem_versin b ON a.OID=b.OID AND a.OVer=b.OVer
    LEFT OUTER JOIN TCVersionClass d ON d.OID=b.OID AND d.OVer=b.OVer
    LEFT OUTER JOIN TCSourceObject e ON e.OID=d.osrelTCSourceObjct
    LEFT OUTER JOIN FHCPath f ON f.OID=e.osrelNuPathId
    INNER JOIN ADObject g ON g.OID=b.OID AND g.OVer=b.OVer AND
     g.className='TCSubsystem_version'
    LEFT OUTER JOIN ADLink_source h ON h.classAttr='ADAnnotatedObject.pAnnotationText' AND
      h.sourceOID=g.OID AND h.sourceOVer=g.OVer
    LEFT OUTER JOIN adobjectFind i ON i.OID=h.relOID AND i.OVer=h.relOVer AND
       i.className='ADLinkADAnnotObj2AnnotTxt' AND
       i.contextRelease=a.contextRelease AND i.contextName=a.contextName
    LEFT OUTER JOIN ADLink j ON j.OID=i.OID AND j.OVer=i.OVer
    LEFT OUTER JOIN adobjectFind k ON k.OID=j.adTarget AND
       k.className='ADAnnotationText' AND
       k.contextRelease=a.contextRelease AND k.contextName=a.contextName
    LEFT OUTER JOIN ADAnnotationText l ON l.OID=k.OID AND l.OVer=k.OVer;

CREATE VIEW TCSUBSYSTEMVIEW AS 
  SELECT
    a.*,
    f.name as adName,
    b.subsystemDll,
    b.viewCDLFiles,
    l.label,
    l.contents
  FROM
    OIDOVers a
    INNER JOIN TCSubsystem_versin b ON a.OID=b.OID AND a.OVer=b.OVer
    LEFT OUTER JOIN TCVersionClass d ON d.OID=b.OID AND d.OVer=b.OVer
    LEFT OUTER JOIN TCSourceObject e ON e.OID=d.osrelTCSourceObjct
    LEFT OUTER JOIN FHCPath f ON f.OID=e.osrelNuPathId
    INNER JOIN ADObject g ON g.OID=b.OID AND g.OVer=b.OVer AND
     g.className='TCSubsystem_version'
    LEFT OUTER JOIN ADLink_source h ON h.classAttr='ADAnnotatedObject.pAnnotationText' AND
      h.sourceOID=g.OID AND h.sourceOVer=g.OVer
    LEFT OUTER JOIN adobjectFind i ON i.OID=h.relOID AND i.OVer=h.relOVer AND
       i.className='ADLinkADAnnotObj2AnnotTxt' AND
       i.contextRelease=a.contextRelease AND i.contextName=a.contextName
    LEFT OUTER JOIN ADLink j ON j.OID=i.OID AND j.OVer=i.OVer
    LEFT OUTER JOIN adobjectFind k ON k.OID=j.adTarget AND
       k.className='ADAnnotationText' AND
       k.contextRelease=a.contextRelease AND k.contextName=a.contextName
    LEFT OUTER JOIN ADAnnotationText l ON l.OID=k.OID AND l.OVer=k.OVer;

