- This topic has 3 replies, 2 voices, and was last updated 10 years, 1 month ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Home › Forums › eaDocX queries › EA Search and sort order
Home › Forums › eaDocX queries › EA Search and sort order
When using an EA Search as the Source for a Report Section, it would be good to have a flag to indicate whether the output should be sorted by the order embedded in the EA Search query (and as displayed in EA) or to use EADocX’s default sort order.
Can you post an example of your SQL, which has an embedded sort order?
Here’s the SQL the Search Term used was ‘Data Warehouse Features’.
[code]select O.ea_guid AS CLASSGUID, O.Object_Type AS CLASSTYPE, O.Name, O.Note, ‘Capability’ as Item, TV.Value AS CapabilityRef, TV0.Value AS CapabilityRefL0, TV1.Value AS CapabilityRefL1, TV2.Value AS CapabilityRefL2, TV3.Value AS CapabilityRefL3, TV4.Value AS CapabilityRefL4
from t_object O
inner join t_diagramobjects DO on O.object_id = DO.object_id
inner join t_diagram D on D.diagram_id = DO.diagram_id
left join t_objectproperties TV on O.object_id = TV.object_id and TV.property = ‘CapabilityRef’
left join t_objectproperties TV0 on O.object_id = TV0.object_id and TV0.property = ‘CapabilityRefL0’
left join t_objectproperties TV1 on O.object_id = TV1.object_id and TV1.property = ‘CapabilityRefL1’
left join t_objectproperties TV2 on O.object_id = TV2.object_id and TV2.property = ‘CapabilityRefL2’
left join t_objectproperties TV3 on O.object_id = TV3.object_id and TV3.property = ‘CapabilityRefL3’
left join t_objectproperties TV4 on O.object_id = TV4.object_id and TV4.property = ‘CapabilityRefL4’
where D.name = ‘
union all
select O.ea_guid AS CLASSGUID, O.Object_Type AS CLASSTYPE, O.Name, O.Note, ‘Feature’ as Item, TV.Value AS CapabilityRef, TV0.Value AS CapabilityRefL0, TV1.Value AS CapabilityRefL1, TV2.Value AS CapabilityRefL2, TV3.Value AS CapabilityRefL3, TV4.Value AS CapabilityRefL4
from t_object O
inner join t_diagramobjects DO on O.object_id = DO.object_id
inner join t_diagram D on D.diagram_id = DO.diagram_id
inner join t_connector C on C.start_object_id = O.object_id
inner join t_object CO on C.end_object_id = CO.object_ID and CO.Stereotype = ‘Archimate_BusinessFunction’
left join t_objectproperties TV on CO.object_id = TV.object_id and TV.property = ‘CapabilityRef’
left join t_objectproperties TV0 on CO.object_id = TV0.object_id and TV0.property = ‘CapabilityRefL0’
left join t_objectproperties TV1 on CO.object_id = TV1.object_id and TV1.property = ‘CapabilityRefL1’
left join t_objectproperties TV2 on CO.object_id = TV2.object_id and TV2.property = ‘CapabilityRefL2’
left join t_objectproperties TV3 on CO.object_id = TV3.object_id and TV3.property = ‘CapabilityRefL3’
left join t_objectproperties TV4 on CO.object_id = TV4.object_id and TV4.property = ‘CapabilityRefL4’
where D.name = ‘
order by CapabilityRefL0, CapabilityRefL1, CapabilityRefL2, CapabilityRefL3, CapabilityRefL4, Item[/code]
I had meant to add that if you would like an EAP with suitable data in let me know what e-mail address to send it to and I’ll oblige — it’s about 3.5MB.
Download eaTeamWorks today for several free for life features, plus no obligation, 30-day trials of all the products: eaDocX, ea Revision Manager, eaSheets, Model Expert and PortfolioManager. Discover for yourself why we sell the world’s best-selling Enterprise Architect extension.
Download