CREATE VIEW DAQINCLUDEDSOURCE AS 
  SELECT
    a.*,
    f.name as includedSourceDef,
    o.name as usesDataStructure,
    x.name as usesDataElement
  FROM
    OIDOVers a
    INNER JOIN DSInclddSrcDf_vrsn b ON a.OID=b.OID AND a.OVer=b.OVer
    INNER JOIN FHCVersion c ON c.OID=b.OID AND c.OVer=b.OVer
    LEFT OUTER JOIN TCVersionClass d ON d.OID=b.OID AND d.OVer=b.OVer
    LEFT OUTER JOIN TCSourceObject e ON e.OID=d.osrelTCSourceObjct
    LEFT OUTER JOIN ADLink_source g ON g.classAttr='FHCVersion.dependsOn' AND
      g.sourceOID=c.OID AND g.sourceOVer=c.OVer
    LEFT OUTER JOIN adobjectFind h ON h.OID=g.relOID AND h.OVer=g.relOVer AND
       h.className='ADLinkTCPartDependsOnTCPart' AND
       h.contextRelease=a.contextRelease AND h.contextName=a.contextName
    LEFT OUTER JOIN ADLink i ON i.OID=h.OID AND i.OVer=h.OVer
    LEFT OUTER JOIN ADLink_source p ON p.classAttr='FHCVersion.dependsOn' AND
      p.sourceOID=c.OID AND p.sourceOVer=c.OVer
    LEFT OUTER JOIN adobjectFind q ON q.OID=p.relOID AND q.OVer=p.relOVer AND
       q.className='ADLinkTCPartDependsOnTCPart' 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 FHCPath f ON f.OID=e.osrelNuPathId
    LEFT OUTER JOIN OIDOVers j ON j.OID=i.adTarget AND  j.contextOID=a.contextOID
    LEFT OUTER JOIN TCVersionClass m ON m.OID=i.adTarget AND m.OVer=i.OVer
    LEFT OUTER JOIN OIDOVers s ON s.OID=r.adTarget AND  s.contextOID=a.contextOID
    LEFT OUTER JOIN TCVersionClass v ON v.OID=r.adTarget AND v.OVer=r.OVer
    LEFT OUTER JOIN TCSourceObject n ON n.OID=m.osrelTCSourceObjct
    LEFT OUTER JOIN TCSourceObject w ON w.OID=v.osrelTCSourceObjct
    LEFT OUTER JOIN FHCPath o ON o.OID=n.osrelNuPathId
    LEFT OUTER JOIN FHCPath x ON x.OID=w.osrelNuPathId;

