I've been challenged to include in a given fragment both the notes of an element and the linked document associated with it (if any). I've developed the following sql query and fragment:
select obj2.Name, obj2.stereotype, obj2.note as [notes-Formatted], doc.DocID as linkedDocument from ((t_connector conn inner join t_object obj on (obj.object_id=conn.start_object_id or obj.object_id=conn.end_object_id)) inner join t_object obj2 on (obj2.object_id=conn.start_object_id or obj2.object_id=conn.end_object_id)) inner join t_document doc on (obj2.ea_guid=doc.ElementID) where conn.stereotype = 'something' and obj.object_id = #OBJECTID# and obj2.stereotype = 'block' and doc.DocType = 'ModelDocument'
The notes is fine, but the Linked Document part doesn't seem doable. The best I'm managing to do is getting the documentID.
However, I need the actual linked document contents.
Any clues? Is it possible?

