1
General Board / Re: Extracting Conveyed Items using SQL query
« on: September 24, 2021, 11:54:05 pm »
I have the same issue as described here--I think it was never completely answered. I am trying to basically the same query as Chris--and I have tried to use CAST as suggested by Geert. I am not sure where else to load my database to practice the queries other than in MS Access, so that is what I am using. I kept getting an error [Syntax error (missing operator)] when using CAST, but Cvar worked:
SELECT t_connector.Name, t_object.Name, t_object_1.Name, t_object_2.Name
FROM (((t_connector INNER JOIN t_object ON t_connector.Start_Object_ID = t_object.Object_ID)
INNER JOIN t_object AS t_object_1 ON t_connector.End_Object_ID = t_object_1.Object_ID)
INNER JOIN t_xref ON t_connector.ea_guid = t_xref.Client)
INNER JOIN t_object AS t_object_2 ON Cvar(t_xref.Description) = t_object_2.ea_guid
WHERE (((t_connector.Stereotype)="ResourceExchange") AND ((t_xref.Behavior)="conveyed"));
Now, to see what works in Sparx SQL queries.
SELECT t_connector.Name, t_object.Name, t_object_1.Name, t_object_2.Name
FROM (((t_connector INNER JOIN t_object ON t_connector.Start_Object_ID = t_object.Object_ID)
INNER JOIN t_object AS t_object_1 ON t_connector.End_Object_ID = t_object_1.Object_ID)
INNER JOIN t_xref ON t_connector.ea_guid = t_xref.Client)
INNER JOIN t_object AS t_object_2 ON Cvar(t_xref.Description) = t_object_2.ea_guid
WHERE (((t_connector.Stereotype)="ResourceExchange") AND ((t_xref.Behavior)="conveyed"));
Now, to see what works in Sparx SQL queries.
. Phoned a friend and found the answer in ModelView element. Whew!