Book a Demo

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - avanzwol

Pages: [1]
2
General Board / Re: taggedValue not in Package, but in some Element?
« on: February 18, 2025, 09:32:48 pm »
Thanks! That's it!

3
General Board / Re: taggedValue not in Package, but in some Element?
« on: February 18, 2025, 02:23:29 am »
That's is what I tried. But I do get an error:

Incorrect syntax near the keyword 'join'.  :( So the keyword 'outer' is not a valid keyword?

4
General Board / Re: taggedValue not in Package, but in some Element?
« on: February 18, 2025, 12:55:21 am »
Let's say I have the following t_objectproperties:

Code: [Select]
Object_ID;Property;Value;
1;AAA;Foo;
1;BBB;Bar;
2;CCC;Zoo;

And let's say taggedValue "2;CCC;Zoo;" is a tag belonging to a package A. With your query I am able to get:
Code: [Select]
Object_ID;Property;Value;ea_guid;
2;CCC;Zoo;{guidPackageA};

But I would like to have
Code: [Select]
Object_ID;Property;Value;ea_guid;
1;AAA;Foo;;
1;BBB;Bar;;
2;CCC;Zoo;{guidPackageA};

(and with my query I get
Code: [Select]
Object_ID;Property;Value;ea_guid;
1;AAA;Foo;;
1;BBB;Bar;;
2;CCC;Zoo;;
2;CCC;Zoo;{guidPackageA};
).

How do I get the result without duplicate "2;CCC;Zoo;"?

5
General Board / Re: taggedValue not in Package, but in some Element?
« on: February 17, 2025, 10:06:00 pm »
I'm not that experienced in queries, but now I would like to append the result of the query with the rest of the t_objectproperties records without getting double results.

This is what I have so far, but this is with double records:

Code: [Select]
select tv.Object_ID, tv.Property, tv.Value, p.ea_guid from t_objectproperties tv
inner join t_object o on o.Object_ID = tv.Object_ID
inner join t_package p on p.ea_guid = o.ea_guid
union select tv.Object_ID, tv.Property, tv.Value, '' from t_objectproperties tv

I tried outer join, but that keyword is not valid I think.

6
General Board / Re: taggedValue not in Package, but in some Element?
« on: February 17, 2025, 08:14:18 pm »
@Geert Thanks, that makes it a lot clearer to me!

7
General Board / taggedValue not in Package, but in some Element?
« on: February 14, 2025, 07:38:28 pm »
I am maintaining some legacy C# code. I have Elements and Packages that where iterated through with COM objects to get the taggedValues. I noticed this is very slow.
So now I want to do it with queries and put the records in Dictionaries or Lists.

Let's say I have a Package with a Tag "A" with the value "Foo".

With a query
Code: [Select]
SELECT Object_ID, Property, Value FROM t_objectproperties I get all the Tags.

In my C# project I am iterating through the tree up to the root to get the Package with this taggedValue "A". But I noticed I cannot find it. A colleague told me that this Package has an Element which contains the Tag "A".

So now I use also the query
Code: [Select]
SELECT Object_ID AS Child_ID, Package_ID AS Parent_ID FROM t_object to iterate through the child Elements.

But when I find the Package I noticed it has three child Elements. If another child Element also has the Tag "A", things can get very messy. I don't want the Tag of some other sub-branch. So how do I know which Element I need?

Pages: [1]