

CREATE VIEW VGAPPBUILD AS 
  SELECT 
   a.*,
   f.adName AS adName1,
   k.adName AS adName2,
   p.adName AS adName3,
   t.adName AS adName4,
   y.adName AS adName5,
   ad.adName AS adName6,
   ah.adName AS adName7,
   am.adName AS adName8,
   ar.adName AS adName9,
   ax.adName AS adName10,
   bc.adName AS adName11,
   bc.formatLvl AS formatLvl1,
   bc.memberData AS memberData1,
   bh.adName AS adName12,
   bh.formatLvl AS formatLvl2,
   bh.memberData AS memberData2,
   bm.adName AS adName13,
   br.adName AS adName14,
   bw.adName AS adName15,
   cd.adName AS adName16,
   ch.adName AS adName17,
   ch.formatLvl AS formatLvl3,
   ch.memberData AS memberData3,
   cm.adName AS adName18,
   cr.adName AS adName19,
   cw.adName AS adName20,
   da.adName AS adName21,
   da.formatLvl AS formatLvl4,
   da.memberData AS memberData4,
   di.adName AS adName22,
   di.formatLvl AS formatLvl5,
   di.memberData AS memberData5,
   dn.adName AS adName23,
   dn.formatLvl AS formatLvl6,
   dn.memberData AS memberData6,
   ds.adName AS adName24,
   dx.adName AS adName25,
   ec.adName AS adName26,
   ej.adName AS adName27
  FROM
    VGAPPBUILDBase a
    INNER JOIN FHCVersion b ON b.OID=a.OID AND b.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source c ON c.classAttr='VGApplication_version.dependsOn' AND
      c.sourceOID=b.OID AND c.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind d ON d.OID=c.relOID AND d.OVer=c.relOVer AND
       d.className='ADLinkTCPartDependsOnTCPart' AND
       d.contextRelease=a.contextRelease AND d.contextName=a.contextName
    LEFT OUTER JOIN ADLink e ON e.OID=d.OID AND e.OVer=d.OVer
    LEFT OUTER JOIN VGRCDASSOCIATESBas f ON f.OID=e.adTarget AND f.OVer=e.OVer    
AND  f.contextRelease=a.contextRelease AND  f.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion g ON g.OID=f.OID AND g.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source h ON h.classAttr='VGRecord_version.dependsOn' 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='ADLinkTCPartDependsOnTCPart' 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 VGEXTENDEDOBJECT k ON k.OID=j.adTarget AND k.OVer=j.OVer    
AND  k.contextRelease=a.contextRelease AND  k.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version l ON l.OID=f.OID AND l.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source m ON m.classAttr='VGRecord_version.pVGReferences' AND
      m.sourceOID=l.OID AND m.sourceOVer=l.OVer
    LEFT OUTER JOIN adobjectFind n ON n.OID=m.relOID AND n.OVer=m.relOVer AND
       n.className='VGLinkVGObject2VGObject' 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 VGEXTENDEDOBJECT p ON p.OID=o.adTarget AND p.OVer=o.OVer    
AND  p.contextRelease=a.contextRelease AND  p.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source q ON q.classAttr='VGApplication_version.dependsOn' AND
      q.sourceOID=b.OID AND q.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind r ON r.OID=q.relOID AND r.OVer=q.relOVer AND
       r.className='ADLinkTCPartDependsOnTCPart' AND
       r.contextRelease=a.contextRelease AND r.contextName=a.contextName
    LEFT OUTER JOIN ADLink s ON s.OID=r.OID AND s.OVer=r.OVer
    LEFT OUTER JOIN VGTBLDEFINITIONBas t ON t.OID=s.adTarget AND t.OVer=s.OVer    
AND  t.contextRelease=a.contextRelease AND  t.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion u ON u.OID=t.OID AND u.OVer=t.OVer
    LEFT OUTER JOIN ADLink_source v ON v.classAttr='VGTable_version.dependsOn' AND
      v.sourceOID=u.OID AND v.sourceOVer=u.OVer
    LEFT OUTER JOIN adobjectFind w ON w.OID=v.relOID AND w.OVer=v.relOVer AND
       w.className='ADLinkTCPartDependsOnTCPart' AND
       w.contextRelease=a.contextRelease AND w.contextName=a.contextName
    LEFT OUTER JOIN ADLink x ON x.OID=w.OID AND x.OVer=w.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT y ON y.OID=x.adTarget AND y.OVer=x.OVer    
AND  y.contextRelease=a.contextRelease AND  y.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version z ON z.OID=t.OID AND z.OVer=t.OVer
    LEFT OUTER JOIN ADLink_source aa ON aa.classAttr='VGTable_version.pVGReferences' AND
      aa.sourceOID=z.OID AND aa.sourceOVer=z.OVer
    LEFT OUTER JOIN adobjectFind ab ON ab.OID=aa.relOID AND ab.OVer=aa.relOVer AND
       ab.className='VGLinkVGObject2VGObject' AND
       ab.contextRelease=a.contextRelease AND ab.contextName=a.contextName
    LEFT OUTER JOIN ADLink ac ON ac.OID=ab.OID AND ac.OVer=ab.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT ad ON ad.OID=ac.adTarget AND ad.OVer=ac.OVer    
AND  ad.contextRelease=a.contextRelease AND  ad.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source ae ON ae.classAttr='VGApplication_version.dependsOn' AND
      ae.sourceOID=b.OID AND ae.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind af ON af.OID=ae.relOID AND af.OVer=ae.relOVer AND
       af.className='ADLinkTCPartDependsOnTCPart' AND
       af.contextRelease=a.contextRelease AND af.contextName=a.contextName
    LEFT OUTER JOIN ADLink ag ON ag.OID=af.OID AND ag.OVer=af.OVer
    LEFT OUTER JOIN VGMAPASSOCIATESBas ah ON ah.OID=ag.adTarget AND ah.OVer=ag.OVer    
AND  ah.contextRelease=a.contextRelease AND  ah.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion ai ON ai.OID=ah.OID AND ai.OVer=ah.OVer
    LEFT OUTER JOIN ADLink_source aj ON aj.classAttr='VGMap_version.dependsOn' AND
      aj.sourceOID=ai.OID AND aj.sourceOVer=ai.OVer
    LEFT OUTER JOIN adobjectFind ak ON ak.OID=aj.relOID AND ak.OVer=aj.relOVer AND
       ak.className='ADLinkTCPartDependsOnTCPart' AND
       ak.contextRelease=a.contextRelease AND ak.contextName=a.contextName
    LEFT OUTER JOIN ADLink al ON al.OID=ak.OID AND al.OVer=ak.OVer
    LEFT OUTER JOIN VGTBLDEFINITIONBas am ON am.OID=al.adTarget AND am.OVer=al.OVer    
AND  am.contextRelease=a.contextRelease AND  am.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion an ON an.OID=am.OID AND an.OVer=am.OVer
    LEFT OUTER JOIN ADLink_source ao ON ao.classAttr='VGTable_version.dependsOn' 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='ADLinkTCPartDependsOnTCPart' 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 VGEXTENDEDOBJECT ar ON ar.OID=aq.adTarget AND ar.OVer=aq.OVer    
AND  ar.contextRelease=a.contextRelease AND  ar.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version at ON at.OID=am.OID AND at.OVer=am.OVer
    LEFT OUTER JOIN ADLink_source au ON au.classAttr='VGTable_version.pVGReferences' AND
      au.sourceOID=at.OID AND au.sourceOVer=at.OVer
    LEFT OUTER JOIN adobjectFind av ON av.OID=au.relOID AND av.OVer=au.relOVer AND
       av.className='VGLinkVGObject2VGObject' 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 VGEXTENDEDOBJECT ax ON ax.OID=aw.adTarget AND ax.OVer=aw.OVer    
AND  ax.contextRelease=a.contextRelease AND  ax.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version ay ON ay.OID=ah.OID AND ay.OVer=ah.OVer
    LEFT OUTER JOIN ADLink_source az ON az.classAttr='VGMap_version.pVGAssociates' AND
      az.sourceOID=ay.OID AND az.sourceOVer=ay.OVer
    LEFT OUTER JOIN adobjectFind ba ON ba.OID=az.relOID AND ba.OVer=az.relOVer AND
       ba.className='VGLinkVGObject2Associates' AND
       ba.contextRelease=a.contextRelease AND ba.contextName=a.contextName
    LEFT OUTER JOIN ADLink bb ON bb.OID=ba.OID AND bb.OVer=ba.OVer
    LEFT OUTER JOIN VGAPPSTGASSOCBase bc ON bc.OID=bb.adTarget AND bc.OVer=bb.OVer    
AND  bc.contextRelease=a.contextRelease AND  bc.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion bd ON bd.OID=bc.OID AND bd.OVer=bc.OVer
    LEFT OUTER JOIN ADLink_source be ON be.classAttr='VGStmtGroup_version.dependsOn' AND
      be.sourceOID=bd.OID AND be.sourceOVer=bd.OVer
    LEFT OUTER JOIN adobjectFind bf ON bf.OID=be.relOID AND bf.OVer=be.relOVer AND
       bf.className='ADLinkTCPartDependsOnTCPart' 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 VGAPPPRCASSOCBase bh ON bh.OID=bg.adTarget AND bh.OVer=bg.OVer    
AND  bh.contextRelease=a.contextRelease AND  bh.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion bi ON bi.OID=bh.OID AND bi.OVer=bh.OVer
    LEFT OUTER JOIN ADLink_source bj ON bj.classAttr='VGProcess_version.dependsOn' AND
      bj.sourceOID=bi.OID AND bj.sourceOVer=bi.OVer
    LEFT OUTER JOIN adobjectFind bk ON bk.OID=bj.relOID AND bk.OVer=bj.relOVer AND
       bk.className='ADLinkTCPartDependsOnTCPart' AND
       bk.contextRelease=a.contextRelease AND bk.contextName=a.contextName
    LEFT OUTER JOIN ADLink bl ON bl.OID=bk.OID AND bl.OVer=bk.OVer
    LEFT OUTER JOIN VGRCDASSOCIATESBas bm ON bm.OID=bl.adTarget AND bm.OVer=bl.OVer    
AND  bm.contextRelease=a.contextRelease AND  bm.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion bn ON bn.OID=bm.OID AND bn.OVer=bm.OVer
    LEFT OUTER JOIN ADLink_source bo ON bo.classAttr='VGRecord_version.dependsOn' AND
      bo.sourceOID=bn.OID AND bo.sourceOVer=bn.OVer
    LEFT OUTER JOIN adobjectFind bp ON bp.OID=bo.relOID AND bp.OVer=bo.relOVer AND
       bp.className='ADLinkTCPartDependsOnTCPart' AND
       bp.contextRelease=a.contextRelease AND bp.contextName=a.contextName
    LEFT OUTER JOIN ADLink bq ON bq.OID=bp.OID AND bq.OVer=bp.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT br ON br.OID=bq.adTarget AND br.OVer=bq.OVer    
AND  br.contextRelease=a.contextRelease AND  br.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version bs ON bs.OID=bm.OID AND bs.OVer=bm.OVer
    LEFT OUTER JOIN ADLink_source bt ON bt.classAttr='VGRecord_version.pVGReferences' AND
      bt.sourceOID=bs.OID AND bt.sourceOVer=bs.OVer
    LEFT OUTER JOIN adobjectFind bu ON bu.OID=bt.relOID AND bu.OVer=bt.relOVer AND
       bu.className='VGLinkVGObject2VGObject' AND
       bu.contextRelease=a.contextRelease AND bu.contextName=a.contextName
    LEFT OUTER JOIN ADLink bv ON bv.OID=bu.OID AND bv.OVer=bu.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT bw ON bw.OID=bv.adTarget AND bw.OVer=bv.OVer    
AND  bw.contextRelease=a.contextRelease AND  bw.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source bx ON bx.classAttr='VGProcess_version.dependsOn' AND
      bx.sourceOID=bi.OID AND bx.sourceOVer=bi.OVer
    LEFT OUTER JOIN adobjectFind by ON by.OID=bx.relOID AND by.OVer=bx.relOVer AND
       by.className='ADLinkTCPartDependsOnTCPart' 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 ADLink_source ca ON ca.classAttr='VGMap_version.pVGReferences' AND
      ca.sourceOID=ay.OID AND ca.sourceOVer=ay.OVer
    LEFT OUTER JOIN adobjectFind cb ON cb.OID=ca.relOID AND cb.OVer=ca.relOVer AND
       cb.className='VGLinkVGObject2VGObject' AND
       cb.contextRelease=a.contextRelease AND cb.contextName=a.contextName
    LEFT OUTER JOIN ADLink cc ON cc.OID=cb.OID AND cc.OVer=cb.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT cd ON cd.OID=cc.adTarget AND cd.OVer=cc.OVer    
AND  cd.contextRelease=a.contextRelease AND  cd.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source ce ON ce.classAttr='VGApplication_version.dependsOn' AND
      ce.sourceOID=b.OID AND ce.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind cf ON cf.OID=ce.relOID AND cf.OVer=ce.relOVer AND
       cf.className='ADLinkTCPartDependsOnTCPart' 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 VGAPPPRCASSOCBase ch ON ch.OID=cg.adTarget AND ch.OVer=cg.OVer    
AND  ch.contextRelease=a.contextRelease AND  ch.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion ci ON ci.OID=ch.OID AND ci.OVer=ch.OVer
    LEFT OUTER JOIN ADLink_source cj ON cj.classAttr='VGProcess_version.dependsOn' AND
      cj.sourceOID=ci.OID AND cj.sourceOVer=ci.OVer
    LEFT OUTER JOIN adobjectFind ck ON ck.OID=cj.relOID AND ck.OVer=cj.relOVer AND
       ck.className='ADLinkTCPartDependsOnTCPart' AND
       ck.contextRelease=a.contextRelease AND ck.contextName=a.contextName
    LEFT OUTER JOIN ADLink cl ON cl.OID=ck.OID AND cl.OVer=ck.OVer
    LEFT OUTER JOIN VGRCDASSOCIATESBas cm ON cm.OID=cl.adTarget AND cm.OVer=cl.OVer    
AND  cm.contextRelease=a.contextRelease AND  cm.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion cn ON cn.OID=cm.OID AND cn.OVer=cm.OVer
    LEFT OUTER JOIN ADLink_source co ON co.classAttr='VGRecord_version.dependsOn' 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='ADLinkTCPartDependsOnTCPart' 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 VGEXTENDEDOBJECT cr ON cr.OID=cq.adTarget AND cr.OVer=cq.OVer    
AND  cr.contextRelease=a.contextRelease AND  cr.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version cs ON cs.OID=cm.OID AND cs.OVer=cm.OVer
    LEFT OUTER JOIN ADLink_source ct ON ct.classAttr='VGRecord_version.pVGReferences' AND
      ct.sourceOID=cs.OID AND ct.sourceOVer=cs.OVer
    LEFT OUTER JOIN adobjectFind cu ON cu.OID=ct.relOID AND cu.OVer=ct.relOVer AND
       cu.className='VGLinkVGObject2VGObject' 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 VGEXTENDEDOBJECT cw ON cw.OID=cv.adTarget AND cw.OVer=cv.OVer    
AND  cw.contextRelease=a.contextRelease AND  cw.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source cx ON cx.classAttr='VGProcess_version.dependsOn' AND
      cx.sourceOID=ci.OID AND cx.sourceOVer=ci.OVer
    LEFT OUTER JOIN adobjectFind cy ON cy.OID=cx.relOID AND cy.OVer=cx.relOVer AND
       cy.className='ADLinkTCPartDependsOnTCPart' 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 VGAPPSTGASSOCBase da ON da.OID=cz.adTarget AND da.OVer=cz.OVer    
AND  da.contextRelease=a.contextRelease AND  da.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion db ON db.OID=da.OID AND db.OVer=da.OVer
    LEFT OUTER JOIN ADLink_source dc ON dc.classAttr='VGStmtGroup_version.dependsOn' AND
      dc.sourceOID=db.OID AND dc.sourceOVer=db.OVer
    LEFT OUTER JOIN adobjectFind dd ON dd.OID=dc.relOID AND dd.OVer=dc.relOVer AND
       dd.className='ADLinkTCPartDependsOnTCPart' AND
       dd.contextRelease=a.contextRelease AND dd.contextName=a.contextName
    LEFT OUTER JOIN ADLink de ON de.OID=dd.OID AND de.OVer=dd.OVer
    LEFT OUTER JOIN ADLink_source df ON df.classAttr='VGApplication_version.dependsOn' AND
      df.sourceOID=b.OID AND df.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind dg ON dg.OID=df.relOID AND dg.OVer=df.relOVer AND
       dg.className='ADLinkTCPartDependsOnTCPart' AND
       dg.contextRelease=a.contextRelease AND dg.contextName=a.contextName
    LEFT OUTER JOIN ADLink dh ON dh.OID=dg.OID AND dh.OVer=dg.OVer
    LEFT OUTER JOIN VGAPPSTGASSOCBase di ON di.OID=dh.adTarget AND di.OVer=dh.OVer    
AND  di.contextRelease=a.contextRelease AND  di.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion dj ON dj.OID=di.OID AND dj.OVer=di.OVer
    LEFT OUTER JOIN ADLink_source dk ON dk.classAttr='VGStmtGroup_version.dependsOn' 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='ADLinkTCPartDependsOnTCPart' 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 VGAPPPRCASSOCBase dn ON dn.OID=dm.adTarget AND dn.OVer=dm.OVer    
AND  dn.contextRelease=a.contextRelease AND  dn.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion do ON do.OID=dn.OID AND do.OVer=dn.OVer
    LEFT OUTER JOIN ADLink_source dp ON dp.classAttr='VGProcess_version.dependsOn' AND
      dp.sourceOID=do.OID AND dp.sourceOVer=do.OVer
    LEFT OUTER JOIN adobjectFind dq ON dq.OID=dp.relOID AND dq.OVer=dp.relOVer AND
       dq.className='ADLinkTCPartDependsOnTCPart' AND
       dq.contextRelease=a.contextRelease AND dq.contextName=a.contextName
    LEFT OUTER JOIN ADLink dr ON dr.OID=dq.OID AND dr.OVer=dq.OVer
    LEFT OUTER JOIN VGRCDASSOCIATESBas ds ON ds.OID=dr.adTarget AND ds.OVer=dr.OVer    
AND  ds.contextRelease=a.contextRelease AND  ds.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion dt ON dt.OID=ds.OID AND dt.OVer=ds.OVer
    LEFT OUTER JOIN ADLink_source du ON du.classAttr='VGRecord_version.dependsOn' AND
      du.sourceOID=dt.OID AND du.sourceOVer=dt.OVer
    LEFT OUTER JOIN adobjectFind dv ON dv.OID=du.relOID AND dv.OVer=du.relOVer AND
       dv.className='ADLinkTCPartDependsOnTCPart' AND
       dv.contextRelease=a.contextRelease AND dv.contextName=a.contextName
    LEFT OUTER JOIN ADLink dw ON dw.OID=dv.OID AND dw.OVer=dv.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT dx ON dx.OID=dw.adTarget AND dx.OVer=dw.OVer    
AND  dx.contextRelease=a.contextRelease AND  dx.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version dy ON dy.OID=ds.OID AND dy.OVer=ds.OVer
    LEFT OUTER JOIN ADLink_source dz ON dz.classAttr='VGRecord_version.pVGReferences' AND
      dz.sourceOID=dy.OID AND dz.sourceOVer=dy.OVer
    LEFT OUTER JOIN adobjectFind ea ON ea.OID=dz.relOID AND ea.OVer=dz.relOVer AND
       ea.className='VGLinkVGObject2VGObject' AND
       ea.contextRelease=a.contextRelease AND ea.contextName=a.contextName
    LEFT OUTER JOIN ADLink eb ON eb.OID=ea.OID AND eb.OVer=ea.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT ec ON ec.OID=eb.adTarget AND ec.OVer=eb.OVer    
AND  ec.contextRelease=a.contextRelease AND  ec.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source ed ON ed.classAttr='VGProcess_version.dependsOn' AND
      ed.sourceOID=do.OID AND ed.sourceOVer=do.OVer
    LEFT OUTER JOIN adobjectFind ee ON ee.OID=ed.relOID AND ee.OVer=ed.relOVer AND
       ee.className='ADLinkTCPartDependsOnTCPart' AND
       ee.contextRelease=a.contextRelease AND ee.contextName=a.contextName
    LEFT OUTER JOIN ADLink ef ON ef.OID=ee.OID AND ef.OVer=ee.OVer
    LEFT OUTER JOIN ADLink_source eg ON eg.classAttr='VGApplication_version.dependsOn' AND
      eg.sourceOID=b.OID AND eg.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind eh ON eh.OID=eg.relOID AND eh.OVer=eg.relOVer AND
       eh.className='ADLinkTCPartDependsOnTCPart' AND
       eh.contextRelease=a.contextRelease AND eh.contextName=a.contextName
    LEFT OUTER JOIN ADLink ei ON ei.OID=eh.OID AND ei.OVer=eh.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT ej ON ej.OID=ei.adTarget AND ej.OVer=ei.OVer    
AND  ej.contextRelease=a.contextRelease AND  ej.contextName=a.contextName;

CREATE VIEW VGAPPDEFINITION AS 
  SELECT 
   a.*,
   f.adName AS adName1,
   k.adName AS adName2,
   t.adName AS adName3,
   x.adName AS adName4,
   ab.adName AS adName5,
   ag.adName AS adName6,
   ak.adName AS adName7,
   ao.adName AS adName8,
   au.adName AS adName9,
   bc.adName AS adName10,
   bh.adName AS adName11,
   bl.adName AS adName12,
   bq.adName AS adName13,
   bu.adName AS adName14,
   by.adName AS adName15,
   cd.adName AS adName16,
   ch.adName AS adName17
  FROM
    VGAPPDEFINITIONBas a
    INNER JOIN FHCVersion b ON b.OID=a.OID AND b.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source c ON c.classAttr='VGApplication_version.dependsOn' AND
      c.sourceOID=b.OID AND c.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind d ON d.OID=c.relOID AND d.OVer=c.relOVer AND
       d.className='ADLinkTCPartDependsOnTCPart' AND
       d.contextRelease=a.contextRelease AND d.contextName=a.contextName
    LEFT OUTER JOIN ADLink e ON e.OID=d.OID AND e.OVer=d.OVer
    LEFT OUTER JOIN VGPRCDEFINITIONBas f ON f.OID=e.adTarget AND f.OVer=e.OVer    
AND  f.contextRelease=a.contextRelease AND  f.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion g ON g.OID=f.OID AND g.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source h ON h.classAttr='VGProcess_version.dependsOn' 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='ADLinkTCPartDependsOnTCPart' 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 VGSTGDEFINITIONBas k ON k.OID=j.adTarget AND k.OVer=j.OVer    
AND  k.contextRelease=a.contextRelease AND  k.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion l ON l.OID=k.OID AND l.OVer=k.OVer
    LEFT OUTER JOIN ADLink_source m ON m.classAttr='VGStmtGroup_version.dependsOn' AND
      m.sourceOID=l.OID AND m.sourceOVer=l.OVer
    LEFT OUTER JOIN adobjectFind n ON n.OID=m.relOID AND n.OVer=m.relOVer AND
       n.className='ADLinkTCPartDependsOnTCPart' 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 VGObject_version p ON p.OID=k.OID AND p.OVer=k.OVer
    LEFT OUTER JOIN ADLink_source q ON q.classAttr='VGStmtGroup_version.pVGRelatives' AND
      q.sourceOID=p.OID AND q.sourceOVer=p.OVer
    LEFT OUTER JOIN adobjectFind r ON r.OID=q.relOID AND r.OVer=q.relOVer AND
       r.className='VGLinkVGObject2Relatives' AND
       r.contextRelease=a.contextRelease AND r.contextName=a.contextName
    LEFT OUTER JOIN ADLink s ON s.OID=r.OID AND s.OVer=r.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT t ON t.OID=s.adTarget AND t.OVer=s.OVer    
AND  t.contextRelease=a.contextRelease AND  t.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source u ON u.classAttr='VGStmtGroup_version.pVGReferences' AND
      u.sourceOID=p.OID AND u.sourceOVer=p.OVer
    LEFT OUTER JOIN adobjectFind v ON v.OID=u.relOID AND v.OVer=u.relOVer AND
       v.className='VGLinkVGObject2VGObject' AND
       v.contextRelease=a.contextRelease AND v.contextName=a.contextName
    LEFT OUTER JOIN ADLink w ON w.OID=v.OID AND w.OVer=v.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT x ON x.OID=w.adTarget AND x.OVer=w.OVer    
AND  x.contextRelease=a.contextRelease AND  x.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source y ON y.classAttr='VGProcess_version.dependsOn' AND
      y.sourceOID=g.OID AND y.sourceOVer=g.OVer
    LEFT OUTER JOIN adobjectFind z ON z.OID=y.relOID AND z.OVer=y.relOVer AND
       z.className='ADLinkTCPartDependsOnTCPart' 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 VGEXTENDEDOBJECT ab ON ab.OID=aa.adTarget AND ab.OVer=aa.OVer    
AND  ab.contextRelease=a.contextRelease AND  ab.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version ac ON ac.OID=f.OID AND ac.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source ad ON ad.classAttr='VGProcess_version.pVGRelatives' AND
      ad.sourceOID=ac.OID AND ad.sourceOVer=ac.OVer
    LEFT OUTER JOIN adobjectFind ae ON ae.OID=ad.relOID AND ae.OVer=ad.relOVer AND
       ae.className='VGLinkVGObject2Relatives' 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 VGEXTENDEDOBJECT ag ON ag.OID=af.adTarget AND ag.OVer=af.OVer    
AND  ag.contextRelease=a.contextRelease AND  ag.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source ah ON ah.classAttr='VGProcess_version.pVGReferences' AND
      ah.sourceOID=ac.OID AND ah.sourceOVer=ac.OVer
    LEFT OUTER JOIN adobjectFind ai ON ai.OID=ah.relOID AND ai.OVer=ah.relOVer AND
       ai.className='VGLinkVGObject2VGObject' 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 VGEXTENDEDOBJECT ak ON ak.OID=aj.adTarget AND ak.OVer=aj.OVer    
AND  ak.contextRelease=a.contextRelease AND  ak.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source al ON al.classAttr='VGApplication_version.dependsOn' AND
      al.sourceOID=b.OID AND al.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind am ON am.OID=al.relOID AND am.OVer=al.relOVer AND
       am.className='ADLinkTCPartDependsOnTCPart' 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 VGSTGDEFINITIONBas ao ON ao.OID=an.adTarget AND ao.OVer=an.OVer    
AND  ao.contextRelease=a.contextRelease AND  ao.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion ap ON ap.OID=ao.OID AND ap.OVer=ao.OVer
    LEFT OUTER JOIN ADLink_source aq ON aq.classAttr='VGStmtGroup_version.dependsOn' AND
      aq.sourceOID=ap.OID AND aq.sourceOVer=ap.OVer
    LEFT OUTER JOIN adobjectFind ar ON ar.OID=aq.relOID AND ar.OVer=aq.relOVer AND
       ar.className='ADLinkTCPartDependsOnTCPart' AND
       ar.contextRelease=a.contextRelease AND ar.contextName=a.contextName
    LEFT OUTER JOIN ADLink at ON at.OID=ar.OID AND at.OVer=ar.OVer
    LEFT OUTER JOIN VGPRCDEFINITIONBas au ON au.OID=at.adTarget AND au.OVer=at.OVer    
AND  au.contextRelease=a.contextRelease AND  au.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion av ON av.OID=au.OID AND av.OVer=au.OVer
    LEFT OUTER JOIN ADLink_source aw ON aw.classAttr='VGProcess_version.dependsOn' AND
      aw.sourceOID=av.OID AND aw.sourceOVer=av.OVer
    LEFT OUTER JOIN adobjectFind ax ON ax.OID=aw.relOID AND ax.OVer=aw.relOVer AND
       ax.className='ADLinkTCPartDependsOnTCPart' AND
       ax.contextRelease=a.contextRelease AND ax.contextName=a.contextName
    LEFT OUTER JOIN ADLink ay ON ay.OID=ax.OID AND ay.OVer=ax.OVer
    LEFT OUTER JOIN ADLink_source az ON az.classAttr='VGProcess_version.dependsOn' AND
      az.sourceOID=av.OID AND az.sourceOVer=av.OVer
    LEFT OUTER JOIN adobjectFind ba ON ba.OID=az.relOID AND ba.OVer=az.relOVer AND
       ba.className='ADLinkTCPartDependsOnTCPart' AND
       ba.contextRelease=a.contextRelease AND ba.contextName=a.contextName
    LEFT OUTER JOIN ADLink bb ON bb.OID=ba.OID AND bb.OVer=ba.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT bc ON bc.OID=bb.adTarget AND bc.OVer=bb.OVer    
AND  bc.contextRelease=a.contextRelease AND  bc.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version bd ON bd.OID=au.OID AND bd.OVer=au.OVer
    LEFT OUTER JOIN ADLink_source be ON be.classAttr='VGProcess_version.pVGRelatives' AND
      be.sourceOID=bd.OID AND be.sourceOVer=bd.OVer
    LEFT OUTER JOIN adobjectFind bf ON bf.OID=be.relOID AND bf.OVer=be.relOVer AND
       bf.className='VGLinkVGObject2Relatives' 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 VGEXTENDEDOBJECT bh ON bh.OID=bg.adTarget AND bh.OVer=bg.OVer    
AND  bh.contextRelease=a.contextRelease AND  bh.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source bi ON bi.classAttr='VGProcess_version.pVGReferences' AND
      bi.sourceOID=bd.OID AND bi.sourceOVer=bd.OVer
    LEFT OUTER JOIN adobjectFind bj ON bj.OID=bi.relOID AND bj.OVer=bi.relOVer AND
       bj.className='VGLinkVGObject2VGObject' AND
       bj.contextRelease=a.contextRelease AND bj.contextName=a.contextName
    LEFT OUTER JOIN ADLink bk ON bk.OID=bj.OID AND bk.OVer=bj.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT bl ON bl.OID=bk.adTarget AND bl.OVer=bk.OVer    
AND  bl.contextRelease=a.contextRelease AND  bl.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version bm ON bm.OID=ao.OID AND bm.OVer=ao.OVer
    LEFT OUTER JOIN ADLink_source bn ON bn.classAttr='VGStmtGroup_version.pVGRelatives' AND
      bn.sourceOID=bm.OID AND bn.sourceOVer=bm.OVer
    LEFT OUTER JOIN adobjectFind bo ON bo.OID=bn.relOID AND bo.OVer=bn.relOVer AND
       bo.className='VGLinkVGObject2Relatives' AND
       bo.contextRelease=a.contextRelease AND bo.contextName=a.contextName
    LEFT OUTER JOIN ADLink bp ON bp.OID=bo.OID AND bp.OVer=bo.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT bq ON bq.OID=bp.adTarget AND bq.OVer=bp.OVer    
AND  bq.contextRelease=a.contextRelease AND  bq.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source br ON br.classAttr='VGStmtGroup_version.pVGReferences' AND
      br.sourceOID=bm.OID AND br.sourceOVer=bm.OVer
    LEFT OUTER JOIN adobjectFind bs ON bs.OID=br.relOID AND bs.OVer=br.relOVer AND
       bs.className='VGLinkVGObject2VGObject' AND
       bs.contextRelease=a.contextRelease AND bs.contextName=a.contextName
    LEFT OUTER JOIN ADLink bt ON bt.OID=bs.OID AND bt.OVer=bs.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT bu ON bu.OID=bt.adTarget AND bu.OVer=bt.OVer    
AND  bu.contextRelease=a.contextRelease AND  bu.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source bv ON bv.classAttr='VGApplication_version.dependsOn' AND
      bv.sourceOID=b.OID AND bv.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind bw ON bw.OID=bv.relOID AND bw.OVer=bv.relOVer AND
       bw.className='ADLinkTCPartDependsOnTCPart' AND
       bw.contextRelease=a.contextRelease AND bw.contextName=a.contextName
    LEFT OUTER JOIN ADLink bx ON bx.OID=bw.OID AND bx.OVer=bw.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT by ON by.OID=bx.adTarget AND by.OVer=bx.OVer    
AND  by.contextRelease=a.contextRelease AND  by.contextName=a.contextName
    INNER JOIN VGObject_version bz ON bz.OID=a.OID AND bz.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source ca ON ca.classAttr='VGApplication_version.pVGRelatives' AND
      ca.sourceOID=bz.OID AND ca.sourceOVer=bz.OVer
    LEFT OUTER JOIN adobjectFind cb ON cb.OID=ca.relOID AND cb.OVer=ca.relOVer AND
       cb.className='VGLinkVGObject2Relatives' AND
       cb.contextRelease=a.contextRelease AND cb.contextName=a.contextName
    LEFT OUTER JOIN ADLink cc ON cc.OID=cb.OID AND cc.OVer=cb.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT cd ON cd.OID=cc.adTarget AND cd.OVer=cc.OVer    
AND  cd.contextRelease=a.contextRelease AND  cd.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source ce ON ce.classAttr='VGApplication_version.pVGReferences' AND
      ce.sourceOID=bz.OID AND ce.sourceOVer=bz.OVer
    LEFT OUTER JOIN adobjectFind cf ON cf.OID=ce.relOID AND cf.OVer=ce.relOVer AND
       cf.className='VGLinkVGObject2VGObject' 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 VGEXTENDEDOBJECT ch ON ch.OID=cg.adTarget AND ch.OVer=cg.OVer    
AND  ch.contextRelease=a.contextRelease AND  ch.contextName=a.contextName;

CREATE VIEW VGAPPASSOCIATES AS 
  SELECT 
   a.*,
   f.adName AS adName1,
   k.adName AS adName2,
   p.adName AS adName3,
   t.adName AS adName4,
   y.adName AS adName5,
   ad.adName AS adName6,
   ah.adName AS adName7,
   am.adName AS adName8,
   ar.adName AS adName9,
   ax.adName AS adName10,
   bc.adName AS adName11,
   bc.formatLvl AS formatLvl1,
   bc.memberData AS memberData1,
   bh.adName AS adName12,
   bh.formatLvl AS formatLvl2,
   bh.memberData AS memberData2,
   bm.adName AS adName13,
   br.adName AS adName14,
   bw.adName AS adName15,
   cd.adName AS adName16,
   ch.adName AS adName17,
   ch.formatLvl AS formatLvl3,
   ch.memberData AS memberData3,
   cm.adName AS adName18,
   cr.adName AS adName19,
   cw.adName AS adName20,
   da.adName AS adName21,
   da.formatLvl AS formatLvl4,
   da.memberData AS memberData4,
   di.adName AS adName22,
   di.formatLvl AS formatLvl5,
   di.memberData AS memberData5,
   dn.adName AS adName23,
   dn.formatLvl AS formatLvl6,
   dn.memberData AS memberData6,
   ds.adName AS adName24,
   dx.adName AS adName25,
   ec.adName AS adName26,
   ej.adName AS adName27,
   eo.adName AS adName28,
   et.adName AS adName29,
   ey.adName AS adName30,
   fc.adName AS adName31,
   fg.adName AS adName32,
   fk.adName AS adName33
  FROM
    VGAPPASSOCIATESBas a
    INNER JOIN FHCVersion b ON b.OID=a.OID AND b.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source c ON c.classAttr='VGApplication_version.dependsOn' AND
      c.sourceOID=b.OID AND c.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind d ON d.OID=c.relOID AND d.OVer=c.relOVer AND
       d.className='ADLinkTCPartDependsOnTCPart' AND
       d.contextRelease=a.contextRelease AND d.contextName=a.contextName
    LEFT OUTER JOIN ADLink e ON e.OID=d.OID AND e.OVer=d.OVer
    LEFT OUTER JOIN VGRCDASSOCIATESBas f ON f.OID=e.adTarget AND f.OVer=e.OVer    
AND  f.contextRelease=a.contextRelease AND  f.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion g ON g.OID=f.OID AND g.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source h ON h.classAttr='VGRecord_version.dependsOn' 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='ADLinkTCPartDependsOnTCPart' 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 VGEXTENDEDOBJECT k ON k.OID=j.adTarget AND k.OVer=j.OVer    
AND  k.contextRelease=a.contextRelease AND  k.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version l ON l.OID=f.OID AND l.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source m ON m.classAttr='VGRecord_version.pVGReferences' AND
      m.sourceOID=l.OID AND m.sourceOVer=l.OVer
    LEFT OUTER JOIN adobjectFind n ON n.OID=m.relOID AND n.OVer=m.relOVer AND
       n.className='VGLinkVGObject2VGObject' 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 VGEXTENDEDOBJECT p ON p.OID=o.adTarget AND p.OVer=o.OVer    
AND  p.contextRelease=a.contextRelease AND  p.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source q ON q.classAttr='VGApplication_version.dependsOn' AND
      q.sourceOID=b.OID AND q.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind r ON r.OID=q.relOID AND r.OVer=q.relOVer AND
       r.className='ADLinkTCPartDependsOnTCPart' AND
       r.contextRelease=a.contextRelease AND r.contextName=a.contextName
    LEFT OUTER JOIN ADLink s ON s.OID=r.OID AND s.OVer=r.OVer
    LEFT OUTER JOIN VGTBLDEFINITIONBas t ON t.OID=s.adTarget AND t.OVer=s.OVer    
AND  t.contextRelease=a.contextRelease AND  t.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion u ON u.OID=t.OID AND u.OVer=t.OVer
    LEFT OUTER JOIN ADLink_source v ON v.classAttr='VGTable_version.dependsOn' AND
      v.sourceOID=u.OID AND v.sourceOVer=u.OVer
    LEFT OUTER JOIN adobjectFind w ON w.OID=v.relOID AND w.OVer=v.relOVer AND
       w.className='ADLinkTCPartDependsOnTCPart' AND
       w.contextRelease=a.contextRelease AND w.contextName=a.contextName
    LEFT OUTER JOIN ADLink x ON x.OID=w.OID AND x.OVer=w.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT y ON y.OID=x.adTarget AND y.OVer=x.OVer    
AND  y.contextRelease=a.contextRelease AND  y.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version z ON z.OID=t.OID AND z.OVer=t.OVer
    LEFT OUTER JOIN ADLink_source aa ON aa.classAttr='VGTable_version.pVGReferences' AND
      aa.sourceOID=z.OID AND aa.sourceOVer=z.OVer
    LEFT OUTER JOIN adobjectFind ab ON ab.OID=aa.relOID AND ab.OVer=aa.relOVer AND
       ab.className='VGLinkVGObject2VGObject' AND
       ab.contextRelease=a.contextRelease AND ab.contextName=a.contextName
    LEFT OUTER JOIN ADLink ac ON ac.OID=ab.OID AND ac.OVer=ab.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT ad ON ad.OID=ac.adTarget AND ad.OVer=ac.OVer    
AND  ad.contextRelease=a.contextRelease AND  ad.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source ae ON ae.classAttr='VGApplication_version.dependsOn' AND
      ae.sourceOID=b.OID AND ae.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind af ON af.OID=ae.relOID AND af.OVer=ae.relOVer AND
       af.className='ADLinkTCPartDependsOnTCPart' AND
       af.contextRelease=a.contextRelease AND af.contextName=a.contextName
    LEFT OUTER JOIN ADLink ag ON ag.OID=af.OID AND ag.OVer=af.OVer
    LEFT OUTER JOIN VGMAPASSOCIATESBas ah ON ah.OID=ag.adTarget AND ah.OVer=ag.OVer    
AND  ah.contextRelease=a.contextRelease AND  ah.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion ai ON ai.OID=ah.OID AND ai.OVer=ah.OVer
    LEFT OUTER JOIN ADLink_source aj ON aj.classAttr='VGMap_version.dependsOn' AND
      aj.sourceOID=ai.OID AND aj.sourceOVer=ai.OVer
    LEFT OUTER JOIN adobjectFind ak ON ak.OID=aj.relOID AND ak.OVer=aj.relOVer AND
       ak.className='ADLinkTCPartDependsOnTCPart' AND
       ak.contextRelease=a.contextRelease AND ak.contextName=a.contextName
    LEFT OUTER JOIN ADLink al ON al.OID=ak.OID AND al.OVer=ak.OVer
    LEFT OUTER JOIN VGTBLDEFINITIONBas am ON am.OID=al.adTarget AND am.OVer=al.OVer    
AND  am.contextRelease=a.contextRelease AND  am.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion an ON an.OID=am.OID AND an.OVer=am.OVer
    LEFT OUTER JOIN ADLink_source ao ON ao.classAttr='VGTable_version.dependsOn' 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='ADLinkTCPartDependsOnTCPart' 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 VGEXTENDEDOBJECT ar ON ar.OID=aq.adTarget AND ar.OVer=aq.OVer    
AND  ar.contextRelease=a.contextRelease AND  ar.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version at ON at.OID=am.OID AND at.OVer=am.OVer
    LEFT OUTER JOIN ADLink_source au ON au.classAttr='VGTable_version.pVGReferences' AND
      au.sourceOID=at.OID AND au.sourceOVer=at.OVer
    LEFT OUTER JOIN adobjectFind av ON av.OID=au.relOID AND av.OVer=au.relOVer AND
       av.className='VGLinkVGObject2VGObject' 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 VGEXTENDEDOBJECT ax ON ax.OID=aw.adTarget AND ax.OVer=aw.OVer    
AND  ax.contextRelease=a.contextRelease AND  ax.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version ay ON ay.OID=ah.OID AND ay.OVer=ah.OVer
    LEFT OUTER JOIN ADLink_source az ON az.classAttr='VGMap_version.pVGAssociates' AND
      az.sourceOID=ay.OID AND az.sourceOVer=ay.OVer
    LEFT OUTER JOIN adobjectFind ba ON ba.OID=az.relOID AND ba.OVer=az.relOVer AND
       ba.className='VGLinkVGObject2Associates' AND
       ba.contextRelease=a.contextRelease AND ba.contextName=a.contextName
    LEFT OUTER JOIN ADLink bb ON bb.OID=ba.OID AND bb.OVer=ba.OVer
    LEFT OUTER JOIN VGAPPSTGASSOCBase bc ON bc.OID=bb.adTarget AND bc.OVer=bb.OVer    
AND  bc.contextRelease=a.contextRelease AND  bc.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion bd ON bd.OID=bc.OID AND bd.OVer=bc.OVer
    LEFT OUTER JOIN ADLink_source be ON be.classAttr='VGStmtGroup_version.dependsOn' AND
      be.sourceOID=bd.OID AND be.sourceOVer=bd.OVer
    LEFT OUTER JOIN adobjectFind bf ON bf.OID=be.relOID AND bf.OVer=be.relOVer AND
       bf.className='ADLinkTCPartDependsOnTCPart' 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 VGAPPPRCASSOCBase bh ON bh.OID=bg.adTarget AND bh.OVer=bg.OVer    
AND  bh.contextRelease=a.contextRelease AND  bh.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion bi ON bi.OID=bh.OID AND bi.OVer=bh.OVer
    LEFT OUTER JOIN ADLink_source bj ON bj.classAttr='VGProcess_version.dependsOn' AND
      bj.sourceOID=bi.OID AND bj.sourceOVer=bi.OVer
    LEFT OUTER JOIN adobjectFind bk ON bk.OID=bj.relOID AND bk.OVer=bj.relOVer AND
       bk.className='ADLinkTCPartDependsOnTCPart' AND
       bk.contextRelease=a.contextRelease AND bk.contextName=a.contextName
    LEFT OUTER JOIN ADLink bl ON bl.OID=bk.OID AND bl.OVer=bk.OVer
    LEFT OUTER JOIN VGRCDASSOCIATESBas bm ON bm.OID=bl.adTarget AND bm.OVer=bl.OVer    
AND  bm.contextRelease=a.contextRelease AND  bm.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion bn ON bn.OID=bm.OID AND bn.OVer=bm.OVer
    LEFT OUTER JOIN ADLink_source bo ON bo.classAttr='VGRecord_version.dependsOn' AND
      bo.sourceOID=bn.OID AND bo.sourceOVer=bn.OVer
    LEFT OUTER JOIN adobjectFind bp ON bp.OID=bo.relOID AND bp.OVer=bo.relOVer AND
       bp.className='ADLinkTCPartDependsOnTCPart' AND
       bp.contextRelease=a.contextRelease AND bp.contextName=a.contextName
    LEFT OUTER JOIN ADLink bq ON bq.OID=bp.OID AND bq.OVer=bp.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT br ON br.OID=bq.adTarget AND br.OVer=bq.OVer    
AND  br.contextRelease=a.contextRelease AND  br.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version bs ON bs.OID=bm.OID AND bs.OVer=bm.OVer
    LEFT OUTER JOIN ADLink_source bt ON bt.classAttr='VGRecord_version.pVGReferences' AND
      bt.sourceOID=bs.OID AND bt.sourceOVer=bs.OVer
    LEFT OUTER JOIN adobjectFind bu ON bu.OID=bt.relOID AND bu.OVer=bt.relOVer AND
       bu.className='VGLinkVGObject2VGObject' AND
       bu.contextRelease=a.contextRelease AND bu.contextName=a.contextName
    LEFT OUTER JOIN ADLink bv ON bv.OID=bu.OID AND bv.OVer=bu.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT bw ON bw.OID=bv.adTarget AND bw.OVer=bv.OVer    
AND  bw.contextRelease=a.contextRelease AND  bw.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source bx ON bx.classAttr='VGProcess_version.dependsOn' AND
      bx.sourceOID=bi.OID AND bx.sourceOVer=bi.OVer
    LEFT OUTER JOIN adobjectFind by ON by.OID=bx.relOID AND by.OVer=bx.relOVer AND
       by.className='ADLinkTCPartDependsOnTCPart' 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 ADLink_source ca ON ca.classAttr='VGMap_version.pVGReferences' AND
      ca.sourceOID=ay.OID AND ca.sourceOVer=ay.OVer
    LEFT OUTER JOIN adobjectFind cb ON cb.OID=ca.relOID AND cb.OVer=ca.relOVer AND
       cb.className='VGLinkVGObject2VGObject' AND
       cb.contextRelease=a.contextRelease AND cb.contextName=a.contextName
    LEFT OUTER JOIN ADLink cc ON cc.OID=cb.OID AND cc.OVer=cb.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT cd ON cd.OID=cc.adTarget AND cd.OVer=cc.OVer    
AND  cd.contextRelease=a.contextRelease AND  cd.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source ce ON ce.classAttr='VGApplication_version.dependsOn' AND
      ce.sourceOID=b.OID AND ce.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind cf ON cf.OID=ce.relOID AND cf.OVer=ce.relOVer AND
       cf.className='ADLinkTCPartDependsOnTCPart' 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 VGAPPPRCASSOCBase ch ON ch.OID=cg.adTarget AND ch.OVer=cg.OVer    
AND  ch.contextRelease=a.contextRelease AND  ch.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion ci ON ci.OID=ch.OID AND ci.OVer=ch.OVer
    LEFT OUTER JOIN ADLink_source cj ON cj.classAttr='VGProcess_version.dependsOn' AND
      cj.sourceOID=ci.OID AND cj.sourceOVer=ci.OVer
    LEFT OUTER JOIN adobjectFind ck ON ck.OID=cj.relOID AND ck.OVer=cj.relOVer AND
       ck.className='ADLinkTCPartDependsOnTCPart' AND
       ck.contextRelease=a.contextRelease AND ck.contextName=a.contextName
    LEFT OUTER JOIN ADLink cl ON cl.OID=ck.OID AND cl.OVer=ck.OVer
    LEFT OUTER JOIN VGRCDASSOCIATESBas cm ON cm.OID=cl.adTarget AND cm.OVer=cl.OVer    
AND  cm.contextRelease=a.contextRelease AND  cm.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion cn ON cn.OID=cm.OID AND cn.OVer=cm.OVer
    LEFT OUTER JOIN ADLink_source co ON co.classAttr='VGRecord_version.dependsOn' 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='ADLinkTCPartDependsOnTCPart' 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 VGEXTENDEDOBJECT cr ON cr.OID=cq.adTarget AND cr.OVer=cq.OVer    
AND  cr.contextRelease=a.contextRelease AND  cr.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version cs ON cs.OID=cm.OID AND cs.OVer=cm.OVer
    LEFT OUTER JOIN ADLink_source ct ON ct.classAttr='VGRecord_version.pVGReferences' AND
      ct.sourceOID=cs.OID AND ct.sourceOVer=cs.OVer
    LEFT OUTER JOIN adobjectFind cu ON cu.OID=ct.relOID AND cu.OVer=ct.relOVer AND
       cu.className='VGLinkVGObject2VGObject' 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 VGEXTENDEDOBJECT cw ON cw.OID=cv.adTarget AND cw.OVer=cv.OVer    
AND  cw.contextRelease=a.contextRelease AND  cw.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source cx ON cx.classAttr='VGProcess_version.dependsOn' AND
      cx.sourceOID=ci.OID AND cx.sourceOVer=ci.OVer
    LEFT OUTER JOIN adobjectFind cy ON cy.OID=cx.relOID AND cy.OVer=cx.relOVer AND
       cy.className='ADLinkTCPartDependsOnTCPart' 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 VGAPPSTGASSOCBase da ON da.OID=cz.adTarget AND da.OVer=cz.OVer    
AND  da.contextRelease=a.contextRelease AND  da.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion db ON db.OID=da.OID AND db.OVer=da.OVer
    LEFT OUTER JOIN ADLink_source dc ON dc.classAttr='VGStmtGroup_version.dependsOn' AND
      dc.sourceOID=db.OID AND dc.sourceOVer=db.OVer
    LEFT OUTER JOIN adobjectFind dd ON dd.OID=dc.relOID AND dd.OVer=dc.relOVer AND
       dd.className='ADLinkTCPartDependsOnTCPart' AND
       dd.contextRelease=a.contextRelease AND dd.contextName=a.contextName
    LEFT OUTER JOIN ADLink de ON de.OID=dd.OID AND de.OVer=dd.OVer
    LEFT OUTER JOIN ADLink_source df ON df.classAttr='VGApplication_version.dependsOn' AND
      df.sourceOID=b.OID AND df.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind dg ON dg.OID=df.relOID AND dg.OVer=df.relOVer AND
       dg.className='ADLinkTCPartDependsOnTCPart' AND
       dg.contextRelease=a.contextRelease AND dg.contextName=a.contextName
    LEFT OUTER JOIN ADLink dh ON dh.OID=dg.OID AND dh.OVer=dg.OVer
    LEFT OUTER JOIN VGAPPSTGASSOCBase di ON di.OID=dh.adTarget AND di.OVer=dh.OVer    
AND  di.contextRelease=a.contextRelease AND  di.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion dj ON dj.OID=di.OID AND dj.OVer=di.OVer
    LEFT OUTER JOIN ADLink_source dk ON dk.classAttr='VGStmtGroup_version.dependsOn' 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='ADLinkTCPartDependsOnTCPart' 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 VGAPPPRCASSOCBase dn ON dn.OID=dm.adTarget AND dn.OVer=dm.OVer    
AND  dn.contextRelease=a.contextRelease AND  dn.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion do ON do.OID=dn.OID AND do.OVer=dn.OVer
    LEFT OUTER JOIN ADLink_source dp ON dp.classAttr='VGProcess_version.dependsOn' AND
      dp.sourceOID=do.OID AND dp.sourceOVer=do.OVer
    LEFT OUTER JOIN adobjectFind dq ON dq.OID=dp.relOID AND dq.OVer=dp.relOVer AND
       dq.className='ADLinkTCPartDependsOnTCPart' AND
       dq.contextRelease=a.contextRelease AND dq.contextName=a.contextName
    LEFT OUTER JOIN ADLink dr ON dr.OID=dq.OID AND dr.OVer=dq.OVer
    LEFT OUTER JOIN VGRCDASSOCIATESBas ds ON ds.OID=dr.adTarget AND ds.OVer=dr.OVer    
AND  ds.contextRelease=a.contextRelease AND  ds.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion dt ON dt.OID=ds.OID AND dt.OVer=ds.OVer
    LEFT OUTER JOIN ADLink_source du ON du.classAttr='VGRecord_version.dependsOn' AND
      du.sourceOID=dt.OID AND du.sourceOVer=dt.OVer
    LEFT OUTER JOIN adobjectFind dv ON dv.OID=du.relOID AND dv.OVer=du.relOVer AND
       dv.className='ADLinkTCPartDependsOnTCPart' AND
       dv.contextRelease=a.contextRelease AND dv.contextName=a.contextName
    LEFT OUTER JOIN ADLink dw ON dw.OID=dv.OID AND dw.OVer=dv.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT dx ON dx.OID=dw.adTarget AND dx.OVer=dw.OVer    
AND  dx.contextRelease=a.contextRelease AND  dx.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version dy ON dy.OID=ds.OID AND dy.OVer=ds.OVer
    LEFT OUTER JOIN ADLink_source dz ON dz.classAttr='VGRecord_version.pVGReferences' AND
      dz.sourceOID=dy.OID AND dz.sourceOVer=dy.OVer
    LEFT OUTER JOIN adobjectFind ea ON ea.OID=dz.relOID AND ea.OVer=dz.relOVer AND
       ea.className='VGLinkVGObject2VGObject' AND
       ea.contextRelease=a.contextRelease AND ea.contextName=a.contextName
    LEFT OUTER JOIN ADLink eb ON eb.OID=ea.OID AND eb.OVer=ea.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT ec ON ec.OID=eb.adTarget AND ec.OVer=eb.OVer    
AND  ec.contextRelease=a.contextRelease AND  ec.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source ed ON ed.classAttr='VGProcess_version.dependsOn' AND
      ed.sourceOID=do.OID AND ed.sourceOVer=do.OVer
    LEFT OUTER JOIN adobjectFind ee ON ee.OID=ed.relOID AND ee.OVer=ed.relOVer AND
       ee.className='ADLinkTCPartDependsOnTCPart' AND
       ee.contextRelease=a.contextRelease AND ee.contextName=a.contextName
    LEFT OUTER JOIN ADLink ef ON ef.OID=ee.OID AND ef.OVer=ee.OVer
    LEFT OUTER JOIN ADLink_source eg ON eg.classAttr='VGApplication_version.dependsOn' AND
      eg.sourceOID=b.OID AND eg.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind eh ON eh.OID=eg.relOID AND eh.OVer=eg.relOVer AND
       eh.className='ADLinkTCPartDependsOnTCPart' AND
       eh.contextRelease=a.contextRelease AND eh.contextName=a.contextName
    LEFT OUTER JOIN ADLink ei ON ei.OID=eh.OID AND ei.OVer=eh.OVer
    LEFT OUTER JOIN VGPSBASSOCIATESBas ej ON ej.OID=ei.adTarget AND ej.OVer=ei.OVer    
AND  ej.contextRelease=a.contextRelease AND  ej.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version ek ON ek.OID=ej.OID AND ek.OVer=ej.OVer
    LEFT OUTER JOIN ADLink_source el ON el.classAttr='VGPSB_version.pVGAssociates' AND
      el.sourceOID=ek.OID AND el.sourceOVer=ek.OVer
    LEFT OUTER JOIN adobjectFind em ON em.OID=el.relOID AND em.OVer=el.relOVer AND
       em.className='VGLinkVGObject2Associates' AND
       em.contextRelease=a.contextRelease AND em.contextName=a.contextName
    LEFT OUTER JOIN ADLink en ON en.OID=em.OID AND en.OVer=em.OVer
    LEFT OUTER JOIN VGRCDASSOCIATESBas eo ON eo.OID=en.adTarget AND eo.OVer=en.OVer    
AND  eo.contextRelease=a.contextRelease AND  eo.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion ep ON ep.OID=eo.OID AND ep.OVer=eo.OVer
    LEFT OUTER JOIN ADLink_source eq ON eq.classAttr='VGRecord_version.dependsOn' AND
      eq.sourceOID=ep.OID AND eq.sourceOVer=ep.OVer
    LEFT OUTER JOIN adobjectFind er ON er.OID=eq.relOID AND er.OVer=eq.relOVer AND
       er.className='ADLinkTCPartDependsOnTCPart' AND
       er.contextRelease=a.contextRelease AND er.contextName=a.contextName
    LEFT OUTER JOIN ADLink es ON es.OID=er.OID AND es.OVer=er.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT et ON et.OID=es.adTarget AND et.OVer=es.OVer    
AND  et.contextRelease=a.contextRelease AND  et.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version eu ON eu.OID=eo.OID AND eu.OVer=eo.OVer
    LEFT OUTER JOIN ADLink_source ev ON ev.classAttr='VGRecord_version.pVGReferences' AND
      ev.sourceOID=eu.OID AND ev.sourceOVer=eu.OVer
    LEFT OUTER JOIN adobjectFind ew ON ew.OID=ev.relOID AND ew.OVer=ev.relOVer AND
       ew.className='VGLinkVGObject2VGObject' AND
       ew.contextRelease=a.contextRelease AND ew.contextName=a.contextName
    LEFT OUTER JOIN ADLink ex ON ex.OID=ew.OID AND ex.OVer=ew.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT ey ON ey.OID=ex.adTarget AND ey.OVer=ex.OVer    
AND  ey.contextRelease=a.contextRelease AND  ey.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source ez ON ez.classAttr='VGPSB_version.pVGAssociates' AND
      ez.sourceOID=ek.OID AND ez.sourceOVer=ek.OVer
    LEFT OUTER JOIN adobjectFind fa ON fa.OID=ez.relOID AND fa.OVer=ez.relOVer AND
       fa.className='VGLinkVGObject2Associates' AND
       fa.contextRelease=a.contextRelease AND fa.contextName=a.contextName
    LEFT OUTER JOIN ADLink fb ON fb.OID=fa.OID AND fb.OVer=fa.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT fc ON fc.OID=fb.adTarget AND fc.OVer=fb.OVer    
AND  fc.contextRelease=a.contextRelease AND  fc.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source fd ON fd.classAttr='VGPSB_version.pVGReferences' AND
      fd.sourceOID=ek.OID AND fd.sourceOVer=ek.OVer
    LEFT OUTER JOIN adobjectFind fe ON fe.OID=fd.relOID AND fe.OVer=fd.relOVer AND
       fe.className='VGLinkVGObject2VGObject' AND
       fe.contextRelease=a.contextRelease AND fe.contextName=a.contextName
    LEFT OUTER JOIN ADLink ff ON ff.OID=fe.OID AND ff.OVer=fe.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT fg ON fg.OID=ff.adTarget AND fg.OVer=ff.OVer    
AND  fg.contextRelease=a.contextRelease AND  fg.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source fh ON fh.classAttr='VGApplication_version.dependsOn' AND
      fh.sourceOID=b.OID AND fh.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind fi ON fi.OID=fh.relOID AND fi.OVer=fh.relOVer AND
       fi.className='ADLinkTCPartDependsOnTCPart' AND
       fi.contextRelease=a.contextRelease AND fi.contextName=a.contextName
    LEFT OUTER JOIN ADLink fj ON fj.OID=fi.OID AND fj.OVer=fi.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT fk ON fk.OID=fj.adTarget AND fk.OVer=fj.OVer    
AND  fk.contextRelease=a.contextRelease AND  fk.contextName=a.contextName;

CREATE VIEW VGAPPPRCASSOC AS 
  SELECT 
   a.*,
   f.adName AS adName1,
   k.adName AS adName2,
   p.adName AS adName3,
   t.adName AS adName4,
   t.formatLvl AS formatLvl1,
   t.memberData AS memberData1
  FROM
    VGAPPPRCASSOCBase a
    INNER JOIN FHCVersion b ON b.OID=a.OID AND b.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source c ON c.classAttr='VGProcess_version.dependsOn' AND
      c.sourceOID=b.OID AND c.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind d ON d.OID=c.relOID AND d.OVer=c.relOVer AND
       d.className='ADLinkTCPartDependsOnTCPart' AND
       d.contextRelease=a.contextRelease AND d.contextName=a.contextName
    LEFT OUTER JOIN ADLink e ON e.OID=d.OID AND e.OVer=d.OVer
    LEFT OUTER JOIN VGRCDASSOCIATESBas f ON f.OID=e.adTarget AND f.OVer=e.OVer    
AND  f.contextRelease=a.contextRelease AND  f.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion g ON g.OID=f.OID AND g.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source h ON h.classAttr='VGRecord_version.dependsOn' 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='ADLinkTCPartDependsOnTCPart' 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 VGEXTENDEDOBJECT k ON k.OID=j.adTarget AND k.OVer=j.OVer    
AND  k.contextRelease=a.contextRelease AND  k.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version l ON l.OID=f.OID AND l.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source m ON m.classAttr='VGRecord_version.pVGReferences' AND
      m.sourceOID=l.OID AND m.sourceOVer=l.OVer
    LEFT OUTER JOIN adobjectFind n ON n.OID=m.relOID AND n.OVer=m.relOVer AND
       n.className='VGLinkVGObject2VGObject' 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 VGEXTENDEDOBJECT p ON p.OID=o.adTarget AND p.OVer=o.OVer    
AND  p.contextRelease=a.contextRelease AND  p.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source q ON q.classAttr='VGProcess_version.dependsOn' AND
      q.sourceOID=b.OID AND q.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind r ON r.OID=q.relOID AND r.OVer=q.relOVer AND
       r.className='ADLinkTCPartDependsOnTCPart' AND
       r.contextRelease=a.contextRelease AND r.contextName=a.contextName
    LEFT OUTER JOIN ADLink s ON s.OID=r.OID AND s.OVer=r.OVer
    LEFT OUTER JOIN VGAPPSTGASSOCBase t ON t.OID=s.adTarget AND t.OVer=s.OVer    
AND  t.contextRelease=a.contextRelease AND  t.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion u ON u.OID=t.OID AND u.OVer=t.OVer
    LEFT OUTER JOIN ADLink_source v ON v.classAttr='VGStmtGroup_version.dependsOn' AND
      v.sourceOID=u.OID AND v.sourceOVer=u.OVer
    LEFT OUTER JOIN adobjectFind w ON w.OID=v.relOID AND w.OVer=v.relOVer AND
       w.className='ADLinkTCPartDependsOnTCPart' AND
       w.contextRelease=a.contextRelease AND w.contextName=a.contextName
    LEFT OUTER JOIN ADLink x ON x.OID=w.OID AND x.OVer=w.OVer;

CREATE VIEW VGAPPSTGASSOC AS 
  SELECT 
   a.*,
   f.adName AS adName1,
   f.formatLvl AS formatLvl1,
   f.memberData AS memberData1,
   k.adName AS adName2,
   p.adName AS adName3,
   u.adName AS adName4
  FROM
    VGAPPSTGASSOCBase a
    INNER JOIN FHCVersion b ON b.OID=a.OID AND b.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source c ON c.classAttr='VGStmtGroup_version.dependsOn' AND
      c.sourceOID=b.OID AND c.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind d ON d.OID=c.relOID AND d.OVer=c.relOVer AND
       d.className='ADLinkTCPartDependsOnTCPart' AND
       d.contextRelease=a.contextRelease AND d.contextName=a.contextName
    LEFT OUTER JOIN ADLink e ON e.OID=d.OID AND e.OVer=d.OVer
    LEFT OUTER JOIN VGAPPPRCASSOCBase f ON f.OID=e.adTarget AND f.OVer=e.OVer    
AND  f.contextRelease=a.contextRelease AND  f.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion g ON g.OID=f.OID AND g.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source h ON h.classAttr='VGProcess_version.dependsOn' 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='ADLinkTCPartDependsOnTCPart' 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 VGRCDASSOCIATESBas k ON k.OID=j.adTarget AND k.OVer=j.OVer    
AND  k.contextRelease=a.contextRelease AND  k.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion l ON l.OID=k.OID AND l.OVer=k.OVer
    LEFT OUTER JOIN ADLink_source m ON m.classAttr='VGRecord_version.dependsOn' AND
      m.sourceOID=l.OID AND m.sourceOVer=l.OVer
    LEFT OUTER JOIN adobjectFind n ON n.OID=m.relOID AND n.OVer=m.relOVer AND
       n.className='ADLinkTCPartDependsOnTCPart' 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 VGEXTENDEDOBJECT p ON p.OID=o.adTarget AND p.OVer=o.OVer    
AND  p.contextRelease=a.contextRelease AND  p.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version q ON q.OID=k.OID AND q.OVer=k.OVer
    LEFT OUTER JOIN ADLink_source r ON r.classAttr='VGRecord_version.pVGReferences' AND
      r.sourceOID=q.OID AND r.sourceOVer=q.OVer
    LEFT OUTER JOIN adobjectFind s ON s.OID=r.relOID AND s.OVer=r.relOVer AND
       s.className='VGLinkVGObject2VGObject' 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 VGEXTENDEDOBJECT u ON u.OID=t.adTarget AND u.OVer=t.OVer    
AND  u.contextRelease=a.contextRelease AND  u.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source v ON v.classAttr='VGProcess_version.dependsOn' AND
      v.sourceOID=g.OID AND v.sourceOVer=g.OVer
    LEFT OUTER JOIN adobjectFind w ON w.OID=v.relOID AND w.OVer=v.relOVer AND
       w.className='ADLinkTCPartDependsOnTCPart' AND
       w.contextRelease=a.contextRelease AND w.contextName=a.contextName
    LEFT OUTER JOIN ADLink x ON x.OID=w.OID AND x.OVer=w.OVer;

CREATE VIEW VGRCDASSOCIATES AS 
  SELECT 
   a.*,
   f.adName AS adName1,
   k.adName AS adName2
  FROM
    VGRCDASSOCIATESBas a
    INNER JOIN FHCVersion b ON b.OID=a.OID AND b.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source c ON c.classAttr='VGRecord_version.dependsOn' AND
      c.sourceOID=b.OID AND c.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind d ON d.OID=c.relOID AND d.OVer=c.relOVer AND
       d.className='ADLinkTCPartDependsOnTCPart' AND
       d.contextRelease=a.contextRelease AND d.contextName=a.contextName
    LEFT OUTER JOIN ADLink e ON e.OID=d.OID AND e.OVer=d.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT f ON f.OID=e.adTarget AND f.OVer=e.OVer    
AND  f.contextRelease=a.contextRelease AND  f.contextName=a.contextName
    INNER JOIN VGObject_version g ON g.OID=a.OID AND g.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source h ON h.classAttr='VGRecord_version.pVGReferences' 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='VGLinkVGObject2VGObject' 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 VGEXTENDEDOBJECT k ON k.OID=j.adTarget AND k.OVer=j.OVer    
AND  k.contextRelease=a.contextRelease AND  k.contextName=a.contextName;

CREATE VIEW VGGUIASSOCIATES AS 
  SELECT 
   a.*,
   f.adName AS adName1,
   k.adName AS adName2,
   p.adName AS adName3,
   t.adName AS adName4,
   y.adName AS adName5,
   ad.adName AS adName6,
   ah.adName AS adName7,
   am.adName AS adName8,
   aw.adName AS adName9,
   bb.adName AS adName10,
   bf.adName AS adName11,
   bk.adName AS adName12,
   bt.adName AS adName13,
   by.adName AS adName14,
   cd.adName AS adName15
  FROM
    VGGUIASSOCIATESBas a
    INNER JOIN FHCVersion b ON b.OID=a.OID AND b.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source c ON c.classAttr='VGGUI_version.dependsOn' AND
      c.sourceOID=b.OID AND c.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind d ON d.OID=c.relOID AND d.OVer=c.relOVer AND
       d.className='ADLinkTCPartDependsOnTCPart' AND
       d.contextRelease=a.contextRelease AND d.contextName=a.contextName
    LEFT OUTER JOIN ADLink e ON e.OID=d.OID AND e.OVer=d.OVer
    LEFT OUTER JOIN VGRCDASSOCIATESBas f ON f.OID=e.adTarget AND f.OVer=e.OVer    
AND  f.contextRelease=a.contextRelease AND  f.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion g ON g.OID=f.OID AND g.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source h ON h.classAttr='VGRecord_version.dependsOn' 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='ADLinkTCPartDependsOnTCPart' 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 VGEXTENDEDOBJECT k ON k.OID=j.adTarget AND k.OVer=j.OVer    
AND  k.contextRelease=a.contextRelease AND  k.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version l ON l.OID=f.OID AND l.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source m ON m.classAttr='VGRecord_version.pVGReferences' AND
      m.sourceOID=l.OID AND m.sourceOVer=l.OVer
    LEFT OUTER JOIN adobjectFind n ON n.OID=m.relOID AND n.OVer=m.relOVer AND
       n.className='VGLinkVGObject2VGObject' 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 VGEXTENDEDOBJECT p ON p.OID=o.adTarget AND p.OVer=o.OVer    
AND  p.contextRelease=a.contextRelease AND  p.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source q ON q.classAttr='VGGUI_version.dependsOn' AND
      q.sourceOID=b.OID AND q.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind r ON r.OID=q.relOID AND r.OVer=q.relOVer AND
       r.className='ADLinkTCPartDependsOnTCPart' AND
       r.contextRelease=a.contextRelease AND r.contextName=a.contextName
    LEFT OUTER JOIN ADLink s ON s.OID=r.OID AND s.OVer=r.OVer
    LEFT OUTER JOIN VGTBLDEFINITIONBas t ON t.OID=s.adTarget AND t.OVer=s.OVer    
AND  t.contextRelease=a.contextRelease AND  t.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion u ON u.OID=t.OID AND u.OVer=t.OVer
    LEFT OUTER JOIN ADLink_source v ON v.classAttr='VGTable_version.dependsOn' AND
      v.sourceOID=u.OID AND v.sourceOVer=u.OVer
    LEFT OUTER JOIN adobjectFind w ON w.OID=v.relOID AND w.OVer=v.relOVer AND
       w.className='ADLinkTCPartDependsOnTCPart' AND
       w.contextRelease=a.contextRelease AND w.contextName=a.contextName
    LEFT OUTER JOIN ADLink x ON x.OID=w.OID AND x.OVer=w.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT y ON y.OID=x.adTarget AND y.OVer=x.OVer    
AND  y.contextRelease=a.contextRelease AND  y.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version z ON z.OID=t.OID AND z.OVer=t.OVer
    LEFT OUTER JOIN ADLink_source aa ON aa.classAttr='VGTable_version.pVGReferences' AND
      aa.sourceOID=z.OID AND aa.sourceOVer=z.OVer
    LEFT OUTER JOIN adobjectFind ab ON ab.OID=aa.relOID AND ab.OVer=aa.relOVer AND
       ab.className='VGLinkVGObject2VGObject' AND
       ab.contextRelease=a.contextRelease AND ab.contextName=a.contextName
    LEFT OUTER JOIN ADLink ac ON ac.OID=ab.OID AND ac.OVer=ab.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT ad ON ad.OID=ac.adTarget AND ad.OVer=ac.OVer    
AND  ad.contextRelease=a.contextRelease AND  ad.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source ae ON ae.classAttr='VGGUI_version.dependsOn' AND
      ae.sourceOID=b.OID AND ae.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind af ON af.OID=ae.relOID AND af.OVer=ae.relOVer AND
       af.className='ADLinkTCPartDependsOnTCPart' AND
       af.contextRelease=a.contextRelease AND af.contextName=a.contextName
    LEFT OUTER JOIN ADLink ag ON ag.OID=af.OID AND ag.OVer=af.OVer
    LEFT OUTER JOIN VGGUIPRCASSOCBase ah ON ah.OID=ag.adTarget AND ah.OVer=ag.OVer    
AND  ah.contextRelease=a.contextRelease AND  ah.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion ai ON ai.OID=ah.OID AND ai.OVer=ah.OVer
    LEFT OUTER JOIN ADLink_source aj ON aj.classAttr='VGProcess_version.dependsOn' AND
      aj.sourceOID=ai.OID AND aj.sourceOVer=ai.OVer
    LEFT OUTER JOIN adobjectFind ak ON ak.OID=aj.relOID AND ak.OVer=aj.relOVer AND
       ak.className='ADLinkTCPartDependsOnTCPart' AND
       ak.contextRelease=a.contextRelease AND ak.contextName=a.contextName
    LEFT OUTER JOIN ADLink al ON al.OID=ak.OID AND al.OVer=ak.OVer
    LEFT OUTER JOIN VGGUISTGASSOCBase am ON am.OID=al.adTarget AND am.OVer=al.OVer    
AND  am.contextRelease=a.contextRelease AND  am.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion an ON an.OID=am.OID AND an.OVer=am.OVer
    LEFT OUTER JOIN ADLink_source ao ON ao.classAttr='VGStmtGroup_version.dependsOn' 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='ADLinkTCPartDependsOnTCPart' 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 VGObject_version ar ON ar.OID=am.OID AND ar.OVer=am.OVer
    LEFT OUTER JOIN ADLink_source at ON at.classAttr='VGStmtGroup_version.pVGReferences' AND
      at.sourceOID=ar.OID AND at.sourceOVer=ar.OVer
    LEFT OUTER JOIN adobjectFind au ON au.OID=at.relOID AND au.OVer=at.relOVer AND
       au.className='VGLinkVGObject2VGObject' AND
       au.contextRelease=a.contextRelease AND au.contextName=a.contextName
    LEFT OUTER JOIN ADLink av ON av.OID=au.OID AND av.OVer=au.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT aw ON aw.OID=av.adTarget AND aw.OVer=av.OVer    
AND  aw.contextRelease=a.contextRelease AND  aw.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version ax ON ax.OID=ah.OID AND ax.OVer=ah.OVer
    LEFT OUTER JOIN ADLink_source ay ON ay.classAttr='VGProcess_version.pVGReferences' AND
      ay.sourceOID=ax.OID AND ay.sourceOVer=ax.OVer
    LEFT OUTER JOIN adobjectFind az ON az.OID=ay.relOID AND az.OVer=ay.relOVer AND
       az.className='VGLinkVGObject2VGObject' AND
       az.contextRelease=a.contextRelease AND az.contextName=a.contextName
    LEFT OUTER JOIN ADLink ba ON ba.OID=az.OID AND ba.OVer=az.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT bb ON bb.OID=ba.adTarget AND bb.OVer=ba.OVer    
AND  bb.contextRelease=a.contextRelease AND  bb.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source bc ON bc.classAttr='VGGUI_version.dependsOn' AND
      bc.sourceOID=b.OID AND bc.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind bd ON bd.OID=bc.relOID AND bd.OVer=bc.relOVer AND
       bd.className='ADLinkTCPartDependsOnTCPart' AND
       bd.contextRelease=a.contextRelease AND bd.contextName=a.contextName
    LEFT OUTER JOIN ADLink be ON be.OID=bd.OID AND be.OVer=bd.OVer
    LEFT OUTER JOIN VGGUISTGASSOCBase bf ON bf.OID=be.adTarget AND bf.OVer=be.OVer    
AND  bf.contextRelease=a.contextRelease AND  bf.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion bg ON bg.OID=bf.OID AND bg.OVer=bf.OVer
    LEFT OUTER JOIN ADLink_source bh ON bh.classAttr='VGStmtGroup_version.dependsOn' AND
      bh.sourceOID=bg.OID AND bh.sourceOVer=bg.OVer
    LEFT OUTER JOIN adobjectFind bi ON bi.OID=bh.relOID AND bi.OVer=bh.relOVer AND
       bi.className='ADLinkTCPartDependsOnTCPart' AND
       bi.contextRelease=a.contextRelease AND bi.contextName=a.contextName
    LEFT OUTER JOIN ADLink bj ON bj.OID=bi.OID AND bj.OVer=bi.OVer
    LEFT OUTER JOIN VGGUIPRCASSOCBase bk ON bk.OID=bj.adTarget AND bk.OVer=bj.OVer    
AND  bk.contextRelease=a.contextRelease AND  bk.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion bl ON bl.OID=bk.OID AND bl.OVer=bk.OVer
    LEFT OUTER JOIN ADLink_source bm ON bm.classAttr='VGProcess_version.dependsOn' AND
      bm.sourceOID=bl.OID AND bm.sourceOVer=bl.OVer
    LEFT OUTER JOIN adobjectFind bn ON bn.OID=bm.relOID AND bn.OVer=bm.relOVer AND
       bn.className='ADLinkTCPartDependsOnTCPart' AND
       bn.contextRelease=a.contextRelease AND bn.contextName=a.contextName
    LEFT OUTER JOIN ADLink bo ON bo.OID=bn.OID AND bo.OVer=bn.OVer
    LEFT OUTER JOIN VGObject_version bp ON bp.OID=bk.OID AND bp.OVer=bk.OVer
    LEFT OUTER JOIN ADLink_source bq ON bq.classAttr='VGProcess_version.pVGReferences' AND
      bq.sourceOID=bp.OID AND bq.sourceOVer=bp.OVer
    LEFT OUTER JOIN adobjectFind br ON br.OID=bq.relOID AND br.OVer=bq.relOVer AND
       br.className='VGLinkVGObject2VGObject' AND
       br.contextRelease=a.contextRelease AND br.contextName=a.contextName
    LEFT OUTER JOIN ADLink bs ON bs.OID=br.OID AND bs.OVer=br.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT bt ON bt.OID=bs.adTarget AND bt.OVer=bs.OVer    
AND  bt.contextRelease=a.contextRelease AND  bt.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version bu ON bu.OID=bf.OID AND bu.OVer=bf.OVer
    LEFT OUTER JOIN ADLink_source bv ON bv.classAttr='VGStmtGroup_version.pVGReferences' AND
      bv.sourceOID=bu.OID AND bv.sourceOVer=bu.OVer
    LEFT OUTER JOIN adobjectFind bw ON bw.OID=bv.relOID AND bw.OVer=bv.relOVer AND
       bw.className='VGLinkVGObject2VGObject' AND
       bw.contextRelease=a.contextRelease AND bw.contextName=a.contextName
    LEFT OUTER JOIN ADLink bx ON bx.OID=bw.OID AND bx.OVer=bw.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT by ON by.OID=bx.adTarget AND by.OVer=bx.OVer    
AND  by.contextRelease=a.contextRelease AND  by.contextName=a.contextName
    INNER JOIN VGObject_version bz ON bz.OID=a.OID AND bz.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source ca ON ca.classAttr='VGGUI_version.pVGReferences' AND
      ca.sourceOID=bz.OID AND ca.sourceOVer=bz.OVer
    LEFT OUTER JOIN adobjectFind cb ON cb.OID=ca.relOID AND cb.OVer=ca.relOVer AND
       cb.className='VGLinkVGObject2VGObject' AND
       cb.contextRelease=a.contextRelease AND cb.contextName=a.contextName
    LEFT OUTER JOIN ADLink cc ON cc.OID=cb.OID AND cc.OVer=cb.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT cd ON cd.OID=cc.adTarget AND cd.OVer=cc.OVer    
AND  cd.contextRelease=a.contextRelease AND  cd.contextName=a.contextName;

CREATE VIEW VGGUIPRCASSOC AS 
  SELECT 
   a.*,
   f.adName AS adName1,
   o.adName AS adName2,
   t.adName AS adName3
  FROM
    VGGUIPRCASSOCBase a
    INNER JOIN FHCVersion b ON b.OID=a.OID AND b.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source c ON c.classAttr='VGProcess_version.dependsOn' AND
      c.sourceOID=b.OID AND c.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind d ON d.OID=c.relOID AND d.OVer=c.relOVer AND
       d.className='ADLinkTCPartDependsOnTCPart' AND
       d.contextRelease=a.contextRelease AND d.contextName=a.contextName
    LEFT OUTER JOIN ADLink e ON e.OID=d.OID AND e.OVer=d.OVer
    LEFT OUTER JOIN VGGUISTGASSOCBase f ON f.OID=e.adTarget AND f.OVer=e.OVer    
AND  f.contextRelease=a.contextRelease AND  f.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion g ON g.OID=f.OID AND g.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source h ON h.classAttr='VGStmtGroup_version.dependsOn' 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='ADLinkTCPartDependsOnTCPart' 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 VGObject_version k ON k.OID=f.OID AND k.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source l ON l.classAttr='VGStmtGroup_version.pVGReferences' AND
      l.sourceOID=k.OID AND l.sourceOVer=k.OVer
    LEFT OUTER JOIN adobjectFind m ON m.OID=l.relOID AND m.OVer=l.relOVer AND
       m.className='VGLinkVGObject2VGObject' AND
       m.contextRelease=a.contextRelease AND m.contextName=a.contextName
    LEFT OUTER JOIN ADLink n ON n.OID=m.OID AND n.OVer=m.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT o ON o.OID=n.adTarget AND o.OVer=n.OVer    
AND  o.contextRelease=a.contextRelease AND  o.contextName=a.contextName
    INNER JOIN VGObject_version p ON p.OID=a.OID AND p.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source q ON q.classAttr='VGProcess_version.pVGReferences' AND
      q.sourceOID=p.OID AND q.sourceOVer=p.OVer
    LEFT OUTER JOIN adobjectFind r ON r.OID=q.relOID AND r.OVer=q.relOVer AND
       r.className='VGLinkVGObject2VGObject' AND
       r.contextRelease=a.contextRelease AND r.contextName=a.contextName
    LEFT OUTER JOIN ADLink s ON s.OID=r.OID AND s.OVer=r.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT t ON t.OID=s.adTarget AND t.OVer=s.OVer    
AND  t.contextRelease=a.contextRelease AND  t.contextName=a.contextName;

CREATE VIEW VGGUISTGASSOC AS 
  SELECT 
   a.*,
   f.adName AS adName1,
   o.adName AS adName2,
   t.adName AS adName3
  FROM
    VGGUISTGASSOCBase a
    INNER JOIN FHCVersion b ON b.OID=a.OID AND b.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source c ON c.classAttr='VGStmtGroup_version.dependsOn' AND
      c.sourceOID=b.OID AND c.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind d ON d.OID=c.relOID AND d.OVer=c.relOVer AND
       d.className='ADLinkTCPartDependsOnTCPart' AND
       d.contextRelease=a.contextRelease AND d.contextName=a.contextName
    LEFT OUTER JOIN ADLink e ON e.OID=d.OID AND e.OVer=d.OVer
    LEFT OUTER JOIN VGGUIPRCASSOCBase f ON f.OID=e.adTarget AND f.OVer=e.OVer    
AND  f.contextRelease=a.contextRelease AND  f.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion g ON g.OID=f.OID AND g.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source h ON h.classAttr='VGProcess_version.dependsOn' 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='ADLinkTCPartDependsOnTCPart' 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 VGObject_version k ON k.OID=f.OID AND k.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source l ON l.classAttr='VGProcess_version.pVGReferences' AND
      l.sourceOID=k.OID AND l.sourceOVer=k.OVer
    LEFT OUTER JOIN adobjectFind m ON m.OID=l.relOID AND m.OVer=l.relOVer AND
       m.className='VGLinkVGObject2VGObject' AND
       m.contextRelease=a.contextRelease AND m.contextName=a.contextName
    LEFT OUTER JOIN ADLink n ON n.OID=m.OID AND n.OVer=m.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT o ON o.OID=n.adTarget AND o.OVer=n.OVer    
AND  o.contextRelease=a.contextRelease AND  o.contextName=a.contextName
    INNER JOIN VGObject_version p ON p.OID=a.OID AND p.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source q ON q.classAttr='VGStmtGroup_version.pVGReferences' AND
      q.sourceOID=p.OID AND q.sourceOVer=p.OVer
    LEFT OUTER JOIN adobjectFind r ON r.OID=q.relOID AND r.OVer=q.relOVer AND
       r.className='VGLinkVGObject2VGObject' AND
       r.contextRelease=a.contextRelease AND r.contextName=a.contextName
    LEFT OUTER JOIN ADLink s ON s.OID=r.OID AND s.OVer=r.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT t ON t.OID=s.adTarget AND t.OVer=s.OVer    
AND  t.contextRelease=a.contextRelease AND  t.contextName=a.contextName;

CREATE VIEW VGMAPASSOCIATES AS 
  SELECT 
   a.*,
   f.adName AS adName1,
   k.adName AS adName2,
   p.adName AS adName3,
   u.adName AS adName4,
   u.formatLvl,
   u.memberData,
   z.adName AS adName5,
   z.formatLvl AS formatLvl1,
   z.memberData AS memberData1,
   ae.adName AS adName6,
   aj.adName AS adName7,
   ao.adName AS adName8,
   aw.adName AS adName9
  FROM
    VGMAPASSOCIATESBas a
    INNER JOIN FHCVersion b ON b.OID=a.OID AND b.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source c ON c.classAttr='VGMap_version.dependsOn' AND
      c.sourceOID=b.OID AND c.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind d ON d.OID=c.relOID AND d.OVer=c.relOVer AND
       d.className='ADLinkTCPartDependsOnTCPart' AND
       d.contextRelease=a.contextRelease AND d.contextName=a.contextName
    LEFT OUTER JOIN ADLink e ON e.OID=d.OID AND e.OVer=d.OVer
    LEFT OUTER JOIN VGTBLDEFINITIONBas f ON f.OID=e.adTarget AND f.OVer=e.OVer    
AND  f.contextRelease=a.contextRelease AND  f.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion g ON g.OID=f.OID AND g.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source h ON h.classAttr='VGTable_version.dependsOn' 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='ADLinkTCPartDependsOnTCPart' 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 VGEXTENDEDOBJECT k ON k.OID=j.adTarget AND k.OVer=j.OVer    
AND  k.contextRelease=a.contextRelease AND  k.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version l ON l.OID=f.OID AND l.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source m ON m.classAttr='VGTable_version.pVGReferences' AND
      m.sourceOID=l.OID AND m.sourceOVer=l.OVer
    LEFT OUTER JOIN adobjectFind n ON n.OID=m.relOID AND n.OVer=m.relOVer AND
       n.className='VGLinkVGObject2VGObject' 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 VGEXTENDEDOBJECT p ON p.OID=o.adTarget AND p.OVer=o.OVer    
AND  p.contextRelease=a.contextRelease AND  p.contextName=a.contextName
    INNER JOIN VGObject_version q ON q.OID=a.OID AND q.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source r ON r.classAttr='VGMap_version.pVGAssociates' AND
      r.sourceOID=q.OID AND r.sourceOVer=q.OVer
    LEFT OUTER JOIN adobjectFind s ON s.OID=r.relOID AND s.OVer=r.relOVer AND
       s.className='VGLinkVGObject2Associates' 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 VGAPPSTGASSOCBase u ON u.OID=t.adTarget AND u.OVer=t.OVer    
AND  u.contextRelease=a.contextRelease AND  u.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion v ON v.OID=u.OID AND v.OVer=u.OVer
    LEFT OUTER JOIN ADLink_source w ON w.classAttr='VGStmtGroup_version.dependsOn' 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='ADLinkTCPartDependsOnTCPart' 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 VGAPPPRCASSOCBase z ON z.OID=y.adTarget AND z.OVer=y.OVer    
AND  z.contextRelease=a.contextRelease AND  z.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion aa ON aa.OID=z.OID AND aa.OVer=z.OVer
    LEFT OUTER JOIN ADLink_source ab ON ab.classAttr='VGProcess_version.dependsOn' AND
      ab.sourceOID=aa.OID AND ab.sourceOVer=aa.OVer
    LEFT OUTER JOIN adobjectFind ac ON ac.OID=ab.relOID AND ac.OVer=ab.relOVer AND
       ac.className='ADLinkTCPartDependsOnTCPart' AND
       ac.contextRelease=a.contextRelease AND ac.contextName=a.contextName
    LEFT OUTER JOIN ADLink ad ON ad.OID=ac.OID AND ad.OVer=ac.OVer
    LEFT OUTER JOIN VGRCDASSOCIATESBas ae ON ae.OID=ad.adTarget AND ae.OVer=ad.OVer    
AND  ae.contextRelease=a.contextRelease AND  ae.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion af ON af.OID=ae.OID AND af.OVer=ae.OVer
    LEFT OUTER JOIN ADLink_source ag ON ag.classAttr='VGRecord_version.dependsOn' AND
      ag.sourceOID=af.OID AND ag.sourceOVer=af.OVer
    LEFT OUTER JOIN adobjectFind ah ON ah.OID=ag.relOID AND ah.OVer=ag.relOVer AND
       ah.className='ADLinkTCPartDependsOnTCPart' AND
       ah.contextRelease=a.contextRelease AND ah.contextName=a.contextName
    LEFT OUTER JOIN ADLink ai ON ai.OID=ah.OID AND ai.OVer=ah.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT aj ON aj.OID=ai.adTarget AND aj.OVer=ai.OVer    
AND  aj.contextRelease=a.contextRelease AND  aj.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version ak ON ak.OID=ae.OID AND ak.OVer=ae.OVer
    LEFT OUTER JOIN ADLink_source al ON al.classAttr='VGRecord_version.pVGReferences' AND
      al.sourceOID=ak.OID AND al.sourceOVer=ak.OVer
    LEFT OUTER JOIN adobjectFind am ON am.OID=al.relOID AND am.OVer=al.relOVer AND
       am.className='VGLinkVGObject2VGObject' 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 VGEXTENDEDOBJECT ao ON ao.OID=an.adTarget AND ao.OVer=an.OVer    
AND  ao.contextRelease=a.contextRelease AND  ao.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source ap ON ap.classAttr='VGProcess_version.dependsOn' AND
      ap.sourceOID=aa.OID AND ap.sourceOVer=aa.OVer
    LEFT OUTER JOIN adobjectFind aq ON aq.OID=ap.relOID AND aq.OVer=ap.relOVer AND
       aq.className='ADLinkTCPartDependsOnTCPart' AND
       aq.contextRelease=a.contextRelease AND aq.contextName=a.contextName
    LEFT OUTER JOIN ADLink ar ON ar.OID=aq.OID AND ar.OVer=aq.OVer
    LEFT OUTER JOIN ADLink_source at ON at.classAttr='VGMap_version.pVGReferences' AND
      at.sourceOID=q.OID AND at.sourceOVer=q.OVer
    LEFT OUTER JOIN adobjectFind au ON au.OID=at.relOID AND au.OVer=at.relOVer AND
       au.className='VGLinkVGObject2VGObject' AND
       au.contextRelease=a.contextRelease AND au.contextName=a.contextName
    LEFT OUTER JOIN ADLink av ON av.OID=au.OID AND av.OVer=au.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT aw ON aw.OID=av.adTarget AND aw.OVer=av.OVer    
AND  aw.contextRelease=a.contextRelease AND  aw.contextName=a.contextName;

CREATE VIEW VGPSBASSOCIATES AS 
  SELECT 
   a.*,
   f.adName AS adName1,
   k.adName AS adName2,
   p.adName AS adName3,
   t.adName AS adName4,
   x.adName AS adName5
  FROM
    VGPSBASSOCIATESBas a
    INNER JOIN VGObject_version b ON b.OID=a.OID AND b.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source c ON c.classAttr='VGPSB_version.pVGAssociates' AND
      c.sourceOID=b.OID AND c.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind d ON d.OID=c.relOID AND d.OVer=c.relOVer AND
       d.className='VGLinkVGObject2Associates' AND
       d.contextRelease=a.contextRelease AND d.contextName=a.contextName
    LEFT OUTER JOIN ADLink e ON e.OID=d.OID AND e.OVer=d.OVer
    LEFT OUTER JOIN VGRCDASSOCIATESBas f ON f.OID=e.adTarget AND f.OVer=e.OVer    
AND  f.contextRelease=a.contextRelease AND  f.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion g ON g.OID=f.OID AND g.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source h ON h.classAttr='VGRecord_version.dependsOn' 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='ADLinkTCPartDependsOnTCPart' 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 VGEXTENDEDOBJECT k ON k.OID=j.adTarget AND k.OVer=j.OVer    
AND  k.contextRelease=a.contextRelease AND  k.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version l ON l.OID=f.OID AND l.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source m ON m.classAttr='VGRecord_version.pVGReferences' AND
      m.sourceOID=l.OID AND m.sourceOVer=l.OVer
    LEFT OUTER JOIN adobjectFind n ON n.OID=m.relOID AND n.OVer=m.relOVer AND
       n.className='VGLinkVGObject2VGObject' 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 VGEXTENDEDOBJECT p ON p.OID=o.adTarget AND p.OVer=o.OVer    
AND  p.contextRelease=a.contextRelease AND  p.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source q ON q.classAttr='VGPSB_version.pVGAssociates' AND
      q.sourceOID=b.OID AND q.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind r ON r.OID=q.relOID AND r.OVer=q.relOVer AND
       r.className='VGLinkVGObject2Associates' AND
       r.contextRelease=a.contextRelease AND r.contextName=a.contextName
    LEFT OUTER JOIN ADLink s ON s.OID=r.OID AND s.OVer=r.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT t ON t.OID=s.adTarget AND t.OVer=s.OVer    
AND  t.contextRelease=a.contextRelease AND  t.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source u ON u.classAttr='VGPSB_version.pVGReferences' AND
      u.sourceOID=b.OID AND u.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind v ON v.OID=u.relOID AND v.OVer=u.relOVer AND
       v.className='VGLinkVGObject2VGObject' AND
       v.contextRelease=a.contextRelease AND v.contextName=a.contextName
    LEFT OUTER JOIN ADLink w ON w.OID=v.OID AND w.OVer=v.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT x ON x.OID=w.adTarget AND x.OVer=w.OVer    
AND  x.contextRelease=a.contextRelease AND  x.contextName=a.contextName;

CREATE VIEW VGGUIBUILD AS 
  SELECT 
   a.*,
   f.adName AS adName1,
   k.adName AS adName2,
   p.adName AS adName3,
   t.adName AS adName4,
   y.adName AS adName5,
   ad.adName AS adName6,
   ah.adName AS adName7,
   am.adName AS adName8,
   aw.adName AS adName9,
   bb.adName AS adName10,
   bf.adName AS adName11,
   bk.adName AS adName12,
   bt.adName AS adName13,
   by.adName AS adName14,
   cd.adName AS adName15
  FROM
    VGGUIBUILDBase a
    INNER JOIN FHCVersion b ON b.OID=a.OID AND b.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source c ON c.classAttr='VGGUI_version.dependsOn' AND
      c.sourceOID=b.OID AND c.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind d ON d.OID=c.relOID AND d.OVer=c.relOVer AND
       d.className='ADLinkTCPartDependsOnTCPart' AND
       d.contextRelease=a.contextRelease AND d.contextName=a.contextName
    LEFT OUTER JOIN ADLink e ON e.OID=d.OID AND e.OVer=d.OVer
    LEFT OUTER JOIN VGRCDASSOCIATESBas f ON f.OID=e.adTarget AND f.OVer=e.OVer    
AND  f.contextRelease=a.contextRelease AND  f.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion g ON g.OID=f.OID AND g.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source h ON h.classAttr='VGRecord_version.dependsOn' 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='ADLinkTCPartDependsOnTCPart' 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 VGEXTENDEDOBJECT k ON k.OID=j.adTarget AND k.OVer=j.OVer    
AND  k.contextRelease=a.contextRelease AND  k.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version l ON l.OID=f.OID AND l.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source m ON m.classAttr='VGRecord_version.pVGReferences' AND
      m.sourceOID=l.OID AND m.sourceOVer=l.OVer
    LEFT OUTER JOIN adobjectFind n ON n.OID=m.relOID AND n.OVer=m.relOVer AND
       n.className='VGLinkVGObject2VGObject' 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 VGEXTENDEDOBJECT p ON p.OID=o.adTarget AND p.OVer=o.OVer    
AND  p.contextRelease=a.contextRelease AND  p.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source q ON q.classAttr='VGGUI_version.dependsOn' AND
      q.sourceOID=b.OID AND q.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind r ON r.OID=q.relOID AND r.OVer=q.relOVer AND
       r.className='ADLinkTCPartDependsOnTCPart' AND
       r.contextRelease=a.contextRelease AND r.contextName=a.contextName
    LEFT OUTER JOIN ADLink s ON s.OID=r.OID AND s.OVer=r.OVer
    LEFT OUTER JOIN VGTBLDEFINITIONBas t ON t.OID=s.adTarget AND t.OVer=s.OVer    
AND  t.contextRelease=a.contextRelease AND  t.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion u ON u.OID=t.OID AND u.OVer=t.OVer
    LEFT OUTER JOIN ADLink_source v ON v.classAttr='VGTable_version.dependsOn' AND
      v.sourceOID=u.OID AND v.sourceOVer=u.OVer
    LEFT OUTER JOIN adobjectFind w ON w.OID=v.relOID AND w.OVer=v.relOVer AND
       w.className='ADLinkTCPartDependsOnTCPart' AND
       w.contextRelease=a.contextRelease AND w.contextName=a.contextName
    LEFT OUTER JOIN ADLink x ON x.OID=w.OID AND x.OVer=w.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT y ON y.OID=x.adTarget AND y.OVer=x.OVer    
AND  y.contextRelease=a.contextRelease AND  y.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version z ON z.OID=t.OID AND z.OVer=t.OVer
    LEFT OUTER JOIN ADLink_source aa ON aa.classAttr='VGTable_version.pVGReferences' AND
      aa.sourceOID=z.OID AND aa.sourceOVer=z.OVer
    LEFT OUTER JOIN adobjectFind ab ON ab.OID=aa.relOID AND ab.OVer=aa.relOVer AND
       ab.className='VGLinkVGObject2VGObject' AND
       ab.contextRelease=a.contextRelease AND ab.contextName=a.contextName
    LEFT OUTER JOIN ADLink ac ON ac.OID=ab.OID AND ac.OVer=ab.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT ad ON ad.OID=ac.adTarget AND ad.OVer=ac.OVer    
AND  ad.contextRelease=a.contextRelease AND  ad.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source ae ON ae.classAttr='VGGUI_version.dependsOn' AND
      ae.sourceOID=b.OID AND ae.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind af ON af.OID=ae.relOID AND af.OVer=ae.relOVer AND
       af.className='ADLinkTCPartDependsOnTCPart' AND
       af.contextRelease=a.contextRelease AND af.contextName=a.contextName
    LEFT OUTER JOIN ADLink ag ON ag.OID=af.OID AND ag.OVer=af.OVer
    LEFT OUTER JOIN VGGUIPRCASSOCBase ah ON ah.OID=ag.adTarget AND ah.OVer=ag.OVer    
AND  ah.contextRelease=a.contextRelease AND  ah.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion ai ON ai.OID=ah.OID AND ai.OVer=ah.OVer
    LEFT OUTER JOIN ADLink_source aj ON aj.classAttr='VGProcess_version.dependsOn' AND
      aj.sourceOID=ai.OID AND aj.sourceOVer=ai.OVer
    LEFT OUTER JOIN adobjectFind ak ON ak.OID=aj.relOID AND ak.OVer=aj.relOVer AND
       ak.className='ADLinkTCPartDependsOnTCPart' AND
       ak.contextRelease=a.contextRelease AND ak.contextName=a.contextName
    LEFT OUTER JOIN ADLink al ON al.OID=ak.OID AND al.OVer=ak.OVer
    LEFT OUTER JOIN VGGUISTGASSOCBase am ON am.OID=al.adTarget AND am.OVer=al.OVer    
AND  am.contextRelease=a.contextRelease AND  am.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion an ON an.OID=am.OID AND an.OVer=am.OVer
    LEFT OUTER JOIN ADLink_source ao ON ao.classAttr='VGStmtGroup_version.dependsOn' 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='ADLinkTCPartDependsOnTCPart' 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 VGObject_version ar ON ar.OID=am.OID AND ar.OVer=am.OVer
    LEFT OUTER JOIN ADLink_source at ON at.classAttr='VGStmtGroup_version.pVGReferences' AND
      at.sourceOID=ar.OID AND at.sourceOVer=ar.OVer
    LEFT OUTER JOIN adobjectFind au ON au.OID=at.relOID AND au.OVer=at.relOVer AND
       au.className='VGLinkVGObject2VGObject' AND
       au.contextRelease=a.contextRelease AND au.contextName=a.contextName
    LEFT OUTER JOIN ADLink av ON av.OID=au.OID AND av.OVer=au.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT aw ON aw.OID=av.adTarget AND aw.OVer=av.OVer    
AND  aw.contextRelease=a.contextRelease AND  aw.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version ax ON ax.OID=ah.OID AND ax.OVer=ah.OVer
    LEFT OUTER JOIN ADLink_source ay ON ay.classAttr='VGProcess_version.pVGReferences' AND
      ay.sourceOID=ax.OID AND ay.sourceOVer=ax.OVer
    LEFT OUTER JOIN adobjectFind az ON az.OID=ay.relOID AND az.OVer=ay.relOVer AND
       az.className='VGLinkVGObject2VGObject' AND
       az.contextRelease=a.contextRelease AND az.contextName=a.contextName
    LEFT OUTER JOIN ADLink ba ON ba.OID=az.OID AND ba.OVer=az.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT bb ON bb.OID=ba.adTarget AND bb.OVer=ba.OVer    
AND  bb.contextRelease=a.contextRelease AND  bb.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source bc ON bc.classAttr='VGGUI_version.dependsOn' AND
      bc.sourceOID=b.OID AND bc.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind bd ON bd.OID=bc.relOID AND bd.OVer=bc.relOVer AND
       bd.className='ADLinkTCPartDependsOnTCPart' AND
       bd.contextRelease=a.contextRelease AND bd.contextName=a.contextName
    LEFT OUTER JOIN ADLink be ON be.OID=bd.OID AND be.OVer=bd.OVer
    LEFT OUTER JOIN VGGUISTGASSOCBase bf ON bf.OID=be.adTarget AND bf.OVer=be.OVer    
AND  bf.contextRelease=a.contextRelease AND  bf.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion bg ON bg.OID=bf.OID AND bg.OVer=bf.OVer
    LEFT OUTER JOIN ADLink_source bh ON bh.classAttr='VGStmtGroup_version.dependsOn' AND
      bh.sourceOID=bg.OID AND bh.sourceOVer=bg.OVer
    LEFT OUTER JOIN adobjectFind bi ON bi.OID=bh.relOID AND bi.OVer=bh.relOVer AND
       bi.className='ADLinkTCPartDependsOnTCPart' AND
       bi.contextRelease=a.contextRelease AND bi.contextName=a.contextName
    LEFT OUTER JOIN ADLink bj ON bj.OID=bi.OID AND bj.OVer=bi.OVer
    LEFT OUTER JOIN VGGUIPRCASSOCBase bk ON bk.OID=bj.adTarget AND bk.OVer=bj.OVer    
AND  bk.contextRelease=a.contextRelease AND  bk.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion bl ON bl.OID=bk.OID AND bl.OVer=bk.OVer
    LEFT OUTER JOIN ADLink_source bm ON bm.classAttr='VGProcess_version.dependsOn' AND
      bm.sourceOID=bl.OID AND bm.sourceOVer=bl.OVer
    LEFT OUTER JOIN adobjectFind bn ON bn.OID=bm.relOID AND bn.OVer=bm.relOVer AND
       bn.className='ADLinkTCPartDependsOnTCPart' AND
       bn.contextRelease=a.contextRelease AND bn.contextName=a.contextName
    LEFT OUTER JOIN ADLink bo ON bo.OID=bn.OID AND bo.OVer=bn.OVer
    LEFT OUTER JOIN VGObject_version bp ON bp.OID=bk.OID AND bp.OVer=bk.OVer
    LEFT OUTER JOIN ADLink_source bq ON bq.classAttr='VGProcess_version.pVGReferences' AND
      bq.sourceOID=bp.OID AND bq.sourceOVer=bp.OVer
    LEFT OUTER JOIN adobjectFind br ON br.OID=bq.relOID AND br.OVer=bq.relOVer AND
       br.className='VGLinkVGObject2VGObject' AND
       br.contextRelease=a.contextRelease AND br.contextName=a.contextName
    LEFT OUTER JOIN ADLink bs ON bs.OID=br.OID AND bs.OVer=br.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT bt ON bt.OID=bs.adTarget AND bt.OVer=bs.OVer    
AND  bt.contextRelease=a.contextRelease AND  bt.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version bu ON bu.OID=bf.OID AND bu.OVer=bf.OVer
    LEFT OUTER JOIN ADLink_source bv ON bv.classAttr='VGStmtGroup_version.pVGReferences' AND
      bv.sourceOID=bu.OID AND bv.sourceOVer=bu.OVer
    LEFT OUTER JOIN adobjectFind bw ON bw.OID=bv.relOID AND bw.OVer=bv.relOVer AND
       bw.className='VGLinkVGObject2VGObject' AND
       bw.contextRelease=a.contextRelease AND bw.contextName=a.contextName
    LEFT OUTER JOIN ADLink bx ON bx.OID=bw.OID AND bx.OVer=bw.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT by ON by.OID=bx.adTarget AND by.OVer=bx.OVer    
AND  by.contextRelease=a.contextRelease AND  by.contextName=a.contextName
    INNER JOIN VGObject_version bz ON bz.OID=a.OID AND bz.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source ca ON ca.classAttr='VGGUI_version.pVGReferences' AND
      ca.sourceOID=bz.OID AND ca.sourceOVer=bz.OVer
    LEFT OUTER JOIN adobjectFind cb ON cb.OID=ca.relOID AND cb.OVer=ca.relOVer AND
       cb.className='VGLinkVGObject2VGObject' AND
       cb.contextRelease=a.contextRelease AND cb.contextName=a.contextName
    LEFT OUTER JOIN ADLink cc ON cc.OID=cb.OID AND cc.OVer=cb.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT cd ON cd.OID=cc.adTarget AND cd.OVer=cc.OVer    
AND  cd.contextRelease=a.contextRelease AND  cd.contextName=a.contextName;

CREATE VIEW VGGUIDEFINITION AS 
  SELECT 
   a.*,
   f.adName AS adName1,
   k.adName AS adName2,
   p.adName AS adName3,
   t.adName AS adName4,
   y.adName AS adName5,
   ad.adName AS adName6,
   ai.adName AS adName7,
   am.adName AS adName8
  FROM
    VGGUIDEFINITIONBas a
    INNER JOIN FHCVersion b ON b.OID=a.OID AND b.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source c ON c.classAttr='VGGUI_version.dependsOn' AND
      c.sourceOID=b.OID AND c.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind d ON d.OID=c.relOID AND d.OVer=c.relOVer AND
       d.className='ADLinkTCPartDependsOnTCPart' AND
       d.contextRelease=a.contextRelease AND d.contextName=a.contextName
    LEFT OUTER JOIN ADLink e ON e.OID=d.OID AND e.OVer=d.OVer
    LEFT OUTER JOIN VGRCDDEFINITIONBas f ON f.OID=e.adTarget AND f.OVer=e.OVer    
AND  f.contextRelease=a.contextRelease AND  f.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion g ON g.OID=f.OID AND g.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source h ON h.classAttr='VGRecord_version.dependsOn' 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='ADLinkTCPartDependsOnTCPart' 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 VGEXTENDEDOBJECT k ON k.OID=j.adTarget AND k.OVer=j.OVer    
AND  k.contextRelease=a.contextRelease AND  k.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version l ON l.OID=f.OID AND l.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source m ON m.classAttr='VGRecord_version.pVGReferences' AND
      m.sourceOID=l.OID AND m.sourceOVer=l.OVer
    LEFT OUTER JOIN adobjectFind n ON n.OID=m.relOID AND n.OVer=m.relOVer AND
       n.className='VGLinkVGObject2VGObject' 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 VGEXTENDEDOBJECT p ON p.OID=o.adTarget AND p.OVer=o.OVer    
AND  p.contextRelease=a.contextRelease AND  p.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source q ON q.classAttr='VGGUI_version.dependsOn' AND
      q.sourceOID=b.OID AND q.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind r ON r.OID=q.relOID AND r.OVer=q.relOVer AND
       r.className='ADLinkTCPartDependsOnTCPart' AND
       r.contextRelease=a.contextRelease AND r.contextName=a.contextName
    LEFT OUTER JOIN ADLink s ON s.OID=r.OID AND s.OVer=r.OVer
    LEFT OUTER JOIN VGTBLDEFINITIONBas t ON t.OID=s.adTarget AND t.OVer=s.OVer    
AND  t.contextRelease=a.contextRelease AND  t.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion u ON u.OID=t.OID AND u.OVer=t.OVer
    LEFT OUTER JOIN ADLink_source v ON v.classAttr='VGTable_version.dependsOn' AND
      v.sourceOID=u.OID AND v.sourceOVer=u.OVer
    LEFT OUTER JOIN adobjectFind w ON w.OID=v.relOID AND w.OVer=v.relOVer AND
       w.className='ADLinkTCPartDependsOnTCPart' AND
       w.contextRelease=a.contextRelease AND w.contextName=a.contextName
    LEFT OUTER JOIN ADLink x ON x.OID=w.OID AND x.OVer=w.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT y ON y.OID=x.adTarget AND y.OVer=x.OVer    
AND  y.contextRelease=a.contextRelease AND  y.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version z ON z.OID=t.OID AND z.OVer=t.OVer
    LEFT OUTER JOIN ADLink_source aa ON aa.classAttr='VGTable_version.pVGReferences' AND
      aa.sourceOID=z.OID AND aa.sourceOVer=z.OVer
    LEFT OUTER JOIN adobjectFind ab ON ab.OID=aa.relOID AND ab.OVer=aa.relOVer AND
       ab.className='VGLinkVGObject2VGObject' AND
       ab.contextRelease=a.contextRelease AND ab.contextName=a.contextName
    LEFT OUTER JOIN ADLink ac ON ac.OID=ab.OID AND ac.OVer=ab.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT ad ON ad.OID=ac.adTarget AND ad.OVer=ac.OVer    
AND  ad.contextRelease=a.contextRelease AND  ad.contextName=a.contextName
    INNER JOIN VGObject_version ae ON ae.OID=a.OID AND ae.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source af ON af.classAttr='VGGUI_version.pVGRelatives' AND
      af.sourceOID=ae.OID AND af.sourceOVer=ae.OVer
    LEFT OUTER JOIN adobjectFind ag ON ag.OID=af.relOID AND ag.OVer=af.relOVer AND
       ag.className='VGLinkVGObject2Relatives' AND
       ag.contextRelease=a.contextRelease AND ag.contextName=a.contextName
    LEFT OUTER JOIN ADLink ah ON ah.OID=ag.OID AND ah.OVer=ag.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT ai ON ai.OID=ah.adTarget AND ai.OVer=ah.OVer    
AND  ai.contextRelease=a.contextRelease AND  ai.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source aj ON aj.classAttr='VGGUI_version.pVGReferences' AND
      aj.sourceOID=ae.OID AND aj.sourceOVer=ae.OVer
    LEFT OUTER JOIN adobjectFind ak ON ak.OID=aj.relOID AND ak.OVer=aj.relOVer AND
       ak.className='VGLinkVGObject2VGObject' AND
       ak.contextRelease=a.contextRelease AND ak.contextName=a.contextName
    LEFT OUTER JOIN ADLink al ON al.OID=ak.OID AND al.OVer=ak.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT am ON am.OID=al.adTarget AND am.OVer=al.OVer    
AND  am.contextRelease=a.contextRelease AND  am.contextName=a.contextName;

CREATE VIEW VGMAPDEFINITION AS 
  SELECT 
   a.*,
   f.adName AS adName1,
   k.adName AS adName2,
   p.adName AS adName3,
   u.adName AS adName4
  FROM
    VGMAPDEFINITIONBas a
    INNER JOIN FHCVersion b ON b.OID=a.OID AND b.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source c ON c.classAttr='VGMap_version.dependsOn' AND
      c.sourceOID=b.OID AND c.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind d ON d.OID=c.relOID AND d.OVer=c.relOVer AND
       d.className='ADLinkTCPartDependsOnTCPart' AND
       d.contextRelease=a.contextRelease AND d.contextName=a.contextName
    LEFT OUTER JOIN ADLink e ON e.OID=d.OID AND e.OVer=d.OVer
    LEFT OUTER JOIN VGTBLDEFINITIONBas f ON f.OID=e.adTarget AND f.OVer=e.OVer    
AND  f.contextRelease=a.contextRelease AND  f.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion g ON g.OID=f.OID AND g.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source h ON h.classAttr='VGTable_version.dependsOn' 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='ADLinkTCPartDependsOnTCPart' 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 VGEXTENDEDOBJECT k ON k.OID=j.adTarget AND k.OVer=j.OVer    
AND  k.contextRelease=a.contextRelease AND  k.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version l ON l.OID=f.OID AND l.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source m ON m.classAttr='VGTable_version.pVGReferences' AND
      m.sourceOID=l.OID AND m.sourceOVer=l.OVer
    LEFT OUTER JOIN adobjectFind n ON n.OID=m.relOID AND n.OVer=m.relOVer AND
       n.className='VGLinkVGObject2VGObject' 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 VGEXTENDEDOBJECT p ON p.OID=o.adTarget AND p.OVer=o.OVer    
AND  p.contextRelease=a.contextRelease AND  p.contextName=a.contextName
    INNER JOIN VGObject_version q ON q.OID=a.OID AND q.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source r ON r.classAttr='VGMap_version.pVGReferences' AND
      r.sourceOID=q.OID AND r.sourceOVer=q.OVer
    LEFT OUTER JOIN adobjectFind s ON s.OID=r.relOID AND s.OVer=r.relOVer AND
       s.className='VGLinkVGObject2VGObject' 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 VGEXTENDEDOBJECT u ON u.OID=t.adTarget AND u.OVer=t.OVer    
AND  u.contextRelease=a.contextRelease AND  u.contextName=a.contextName;

CREATE VIEW VGPRCDEFINITION AS 
  SELECT 
   a.*,
   f.adName AS adName1,
   o.adName AS adName2,
   s.adName AS adName3,
   w.adName AS adName4,
   ab.adName AS adName5,
   af.adName AS adName6
  FROM
    VGPRCDEFINITIONBas a
    INNER JOIN FHCVersion b ON b.OID=a.OID AND b.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source c ON c.classAttr='VGProcess_version.dependsOn' AND
      c.sourceOID=b.OID AND c.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind d ON d.OID=c.relOID AND d.OVer=c.relOVer AND
       d.className='ADLinkTCPartDependsOnTCPart' AND
       d.contextRelease=a.contextRelease AND d.contextName=a.contextName
    LEFT OUTER JOIN ADLink e ON e.OID=d.OID AND e.OVer=d.OVer
    LEFT OUTER JOIN VGSTGDEFINITIONBas f ON f.OID=e.adTarget AND f.OVer=e.OVer    
AND  f.contextRelease=a.contextRelease AND  f.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion g ON g.OID=f.OID AND g.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source h ON h.classAttr='VGStmtGroup_version.dependsOn' 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='ADLinkTCPartDependsOnTCPart' 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 VGObject_version k ON k.OID=f.OID AND k.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source l ON l.classAttr='VGStmtGroup_version.pVGRelatives' AND
      l.sourceOID=k.OID AND l.sourceOVer=k.OVer
    LEFT OUTER JOIN adobjectFind m ON m.OID=l.relOID AND m.OVer=l.relOVer AND
       m.className='VGLinkVGObject2Relatives' AND
       m.contextRelease=a.contextRelease AND m.contextName=a.contextName
    LEFT OUTER JOIN ADLink n ON n.OID=m.OID AND n.OVer=m.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT o ON o.OID=n.adTarget AND o.OVer=n.OVer    
AND  o.contextRelease=a.contextRelease AND  o.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source p ON p.classAttr='VGStmtGroup_version.pVGReferences' AND
      p.sourceOID=k.OID AND p.sourceOVer=k.OVer
    LEFT OUTER JOIN adobjectFind q ON q.OID=p.relOID AND q.OVer=p.relOVer AND
       q.className='VGLinkVGObject2VGObject' AND
       q.contextRelease=a.contextRelease AND q.contextName=a.contextName
    LEFT OUTER JOIN ADLink r ON r.OID=q.OID AND r.OVer=q.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT s ON s.OID=r.adTarget AND s.OVer=r.OVer    
AND  s.contextRelease=a.contextRelease AND  s.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source t ON t.classAttr='VGProcess_version.dependsOn' AND
      t.sourceOID=b.OID AND t.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind u ON u.OID=t.relOID AND u.OVer=t.relOVer AND
       u.className='ADLinkTCPartDependsOnTCPart' AND
       u.contextRelease=a.contextRelease AND u.contextName=a.contextName
    LEFT OUTER JOIN ADLink v ON v.OID=u.OID AND v.OVer=u.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT w ON w.OID=v.adTarget AND w.OVer=v.OVer    
AND  w.contextRelease=a.contextRelease AND  w.contextName=a.contextName
    INNER JOIN VGObject_version x ON x.OID=a.OID AND x.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source y ON y.classAttr='VGProcess_version.pVGRelatives' 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='VGLinkVGObject2Relatives' 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 VGEXTENDEDOBJECT ab ON ab.OID=aa.adTarget AND ab.OVer=aa.OVer    
AND  ab.contextRelease=a.contextRelease AND  ab.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source ac ON ac.classAttr='VGProcess_version.pVGReferences' AND
      ac.sourceOID=x.OID AND ac.sourceOVer=x.OVer
    LEFT OUTER JOIN adobjectFind ad ON ad.OID=ac.relOID AND ad.OVer=ac.relOVer AND
       ad.className='VGLinkVGObject2VGObject' 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 VGEXTENDEDOBJECT af ON af.OID=ae.adTarget AND af.OVer=ae.OVer    
AND  af.contextRelease=a.contextRelease AND  af.contextName=a.contextName;

CREATE VIEW VGRCDDEFINITION AS 
  SELECT 
   a.*,
   f.adName AS adName1,
   k.adName AS adName2
  FROM
    VGRCDDEFINITIONBas a
    INNER JOIN FHCVersion b ON b.OID=a.OID AND b.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source c ON c.classAttr='VGRecord_version.dependsOn' AND
      c.sourceOID=b.OID AND c.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind d ON d.OID=c.relOID AND d.OVer=c.relOVer AND
       d.className='ADLinkTCPartDependsOnTCPart' AND
       d.contextRelease=a.contextRelease AND d.contextName=a.contextName
    LEFT OUTER JOIN ADLink e ON e.OID=d.OID AND e.OVer=d.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT f ON f.OID=e.adTarget AND f.OVer=e.OVer    
AND  f.contextRelease=a.contextRelease AND  f.contextName=a.contextName
    INNER JOIN VGObject_version g ON g.OID=a.OID AND g.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source h ON h.classAttr='VGRecord_version.pVGReferences' 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='VGLinkVGObject2VGObject' 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 VGEXTENDEDOBJECT k ON k.OID=j.adTarget AND k.OVer=j.OVer    
AND  k.contextRelease=a.contextRelease AND  k.contextName=a.contextName;

CREATE VIEW VGSTGDEFINITION AS 
  SELECT 
   a.*,
   f.adName AS adName1,
   n.adName AS adName2,
   s.adName AS adName3,
   w.adName AS adName4,
   ab.adName AS adName5,
   af.adName AS adName6
  FROM
    VGSTGDEFINITIONBas a
    INNER JOIN FHCVersion b ON b.OID=a.OID AND b.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source c ON c.classAttr='VGStmtGroup_version.dependsOn' AND
      c.sourceOID=b.OID AND c.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind d ON d.OID=c.relOID AND d.OVer=c.relOVer AND
       d.className='ADLinkTCPartDependsOnTCPart' AND
       d.contextRelease=a.contextRelease AND d.contextName=a.contextName
    LEFT OUTER JOIN ADLink e ON e.OID=d.OID AND e.OVer=d.OVer
    LEFT OUTER JOIN VGPRCDEFINITIONBas f ON f.OID=e.adTarget AND f.OVer=e.OVer    
AND  f.contextRelease=a.contextRelease AND  f.contextName=a.contextName
    LEFT OUTER JOIN FHCVersion g ON g.OID=f.OID AND g.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source h ON h.classAttr='VGProcess_version.dependsOn' 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='ADLinkTCPartDependsOnTCPart' 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 ADLink_source k ON k.classAttr='VGProcess_version.dependsOn' AND
      k.sourceOID=g.OID AND k.sourceOVer=g.OVer
    LEFT OUTER JOIN adobjectFind l ON l.OID=k.relOID AND l.OVer=k.relOVer AND
       l.className='ADLinkTCPartDependsOnTCPart' AND
       l.contextRelease=a.contextRelease AND l.contextName=a.contextName
    LEFT OUTER JOIN ADLink m ON m.OID=l.OID AND m.OVer=l.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT n ON n.OID=m.adTarget AND n.OVer=m.OVer    
AND  n.contextRelease=a.contextRelease AND  n.contextName=a.contextName
    LEFT OUTER JOIN VGObject_version o ON o.OID=f.OID AND o.OVer=f.OVer
    LEFT OUTER JOIN ADLink_source p ON p.classAttr='VGProcess_version.pVGRelatives' AND
      p.sourceOID=o.OID AND p.sourceOVer=o.OVer
    LEFT OUTER JOIN adobjectFind q ON q.OID=p.relOID AND q.OVer=p.relOVer AND
       q.className='VGLinkVGObject2Relatives' AND
       q.contextRelease=a.contextRelease AND q.contextName=a.contextName
    LEFT OUTER JOIN ADLink r ON r.OID=q.OID AND r.OVer=q.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT s ON s.OID=r.adTarget AND s.OVer=r.OVer    
AND  s.contextRelease=a.contextRelease AND  s.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source t ON t.classAttr='VGProcess_version.pVGReferences' AND
      t.sourceOID=o.OID AND t.sourceOVer=o.OVer
    LEFT OUTER JOIN adobjectFind u ON u.OID=t.relOID AND u.OVer=t.relOVer AND
       u.className='VGLinkVGObject2VGObject' AND
       u.contextRelease=a.contextRelease AND u.contextName=a.contextName
    LEFT OUTER JOIN ADLink v ON v.OID=u.OID AND v.OVer=u.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT w ON w.OID=v.adTarget AND w.OVer=v.OVer    
AND  w.contextRelease=a.contextRelease AND  w.contextName=a.contextName
    INNER JOIN VGObject_version x ON x.OID=a.OID AND x.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source y ON y.classAttr='VGStmtGroup_version.pVGRelatives' 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='VGLinkVGObject2Relatives' 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 VGEXTENDEDOBJECT ab ON ab.OID=aa.adTarget AND ab.OVer=aa.OVer    
AND  ab.contextRelease=a.contextRelease AND  ab.contextName=a.contextName
    LEFT OUTER JOIN ADLink_source ac ON ac.classAttr='VGStmtGroup_version.pVGReferences' AND
      ac.sourceOID=x.OID AND ac.sourceOVer=x.OVer
    LEFT OUTER JOIN adobjectFind ad ON ad.OID=ac.relOID AND ad.OVer=ac.relOVer AND
       ad.className='VGLinkVGObject2VGObject' 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 VGEXTENDEDOBJECT af ON af.OID=ae.adTarget AND af.OVer=ae.OVer    
AND  af.contextRelease=a.contextRelease AND  af.contextName=a.contextName;

CREATE VIEW VGTBLDEFINITION AS 
  SELECT 
   a.*,
   f.adName AS adName1,
   k.adName AS adName2
  FROM
    VGTBLDEFINITIONBas a
    INNER JOIN FHCVersion b ON b.OID=a.OID AND b.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source c ON c.classAttr='VGTable_version.dependsOn' AND
      c.sourceOID=b.OID AND c.sourceOVer=b.OVer
    LEFT OUTER JOIN adobjectFind d ON d.OID=c.relOID AND d.OVer=c.relOVer AND
       d.className='ADLinkTCPartDependsOnTCPart' AND
       d.contextRelease=a.contextRelease AND d.contextName=a.contextName
    LEFT OUTER JOIN ADLink e ON e.OID=d.OID AND e.OVer=d.OVer
    LEFT OUTER JOIN VGEXTENDEDOBJECT f ON f.OID=e.adTarget AND f.OVer=e.OVer    
AND  f.contextRelease=a.contextRelease AND  f.contextName=a.contextName
    INNER JOIN VGObject_version g ON g.OID=a.OID AND g.OVer=a.OVer
    LEFT OUTER JOIN ADLink_source h ON h.classAttr='VGTable_version.pVGReferences' 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='VGLinkVGObject2VGObject' 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 VGEXTENDEDOBJECT k ON k.OID=j.adTarget AND k.OVer=j.OVer    
AND  k.contextRelease=a.contextRelease AND  k.contextName=a.contextName;