Home › Forums › eaDocX queries › EA Search and sort order
Home › Forums › eaDocX queries › EA Search and sort order
- This topic has 3 replies, 2 voices, and was last updated 11 years ago by
Neil Clayton.
-
AuthorPosts
-
20 October 2014 at 9:14 am #7892
Neil Clayton
ParticipantWhen 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.
22 October 2014 at 11:09 am #7893eadocX Support
ParticipantCan you post an example of your SQL, which has an embedded sort order?
23 October 2014 at 11:33 am #7894Neil Clayton
ParticipantHere’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 = ‘‘ and O.Stereotype = ‘Archimate_BusinessFunction’
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 = ‘‘ and O.object_type = ‘Feature’
order by CapabilityRefL0, CapabilityRefL1, CapabilityRefL2, CapabilityRefL3, CapabilityRefL4, Item[/code]23 October 2014 at 2:08 pm #7895Neil Clayton
ParticipantI 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.
-
AuthorPosts
- You must be logged in to reply to this topic.
Download a free trial
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