Hi all,
I'm new to the board, and relatively new to EA, so please go easy on me! I'm trying to write a slightly complex SQL search to produce an Information Exchange table as a csv export, which has the following columns:
Connector Name
Source Object Name
Destination Object Name
Connector tagged value1
Connector tagged value2
etc.
I've identified the source tables as t_object, t_connector and t_connectortag. I've got the following statements working:
To match up connector start object ID to object name:
SELECT t_connector.Name, TO1.Name AS Source, t_connector.End_Object_ID
FROM t_connector
LEFT JOIN t_object AS TO1
ON t_connector.Start_Object_ID=TO1.Object_ID
I also restrict the returned connectors by stereotype using a WHERE statement, which seems to work well, but I've left it out so as to not complicate the issue here.
And the same for matching end object ID to object name:
SELECT t_connector.Name, TO2.Name AS Destination, t_connector.Start_Object_ID
FROM t_connector
LEFT JOIN t_object AS TO2
ON t_connector.End_Object_ID=TO1.Object_ID
1st problem: I can't get these two statements to combine, by nesting joins or similar, it just gives me a 'Syntax error (missing operator) in query expression' when I run the following:
SELECT t_connector.Name, TO1.Name AS Source, TO2.Name AS Destination
FROM t_connector
LEFT JOIN t_object AS TO1
ON t_connector.Start_Object_ID=TO1.Object_ID
LEFT JOIN t_object as TO2
ON t_connector.End_Object_ID=TO2.Object_ID
2nd problem: I'm not really sure where to start in getting the Tagged Value property to a column name and the Value as the data in the column, matched up to the Connector ID. Any ideas?
The tagged values are consistent across the stereotype, as I've defined the stereotype in a profile.
Any help greatly appreciated, and I hope I've described the problem adequately.
Rgds
Chris