Hi Daniel.
Well, if I try the same , I get an error in stdlogs :
----
05/09 11:41:46.92 sdm170 sqlagt:select59 17575 ERROR orclclass.c 2198 Fetch error dbfetchDLNX. ORA: 1722:ORA-01722: invalid number , sql_clause = SELECT isscat.id FROM isscat, wftpl WHERE wftpl.object_attrval = isscat.code AND isscat.code IN (SELECT wftpl.object_attrval FROM wftpl WHERE wftpl.task = N'APP')
---
I am wondering that this error is not returned to the UI nor to bop_odump....
Anyway, I understand the following:
wftpl.object_attrval holds id's of the related isscat 's
but isscat's rel_attr is code, not id.
Therefore the system translates part of the query to isscat.code IN ( SELECT wftpl.object_attrval ).
So there seems to be the following circumstance, which is obviously not supported:
The wftpl.obj_attrval attribute is not an srel, nor does it holds the rel_attr value of the referenced object.
I hope that clarifies at least, why it is not working.....
I don't know, if there is a chance to use a different query to get all Issue Categories which have at least one approval task, if this is your business use-case.
Regards
...Michael
------------------------------
Principal Services Consultant
HCL Enterprise Studio
Germany
------------------------------
Original Message:
Sent: 05-08-2020 11:18 AM
From: Daniel Becker Bighelini
Subject: Re: IN clause applied to QREL
Hi Michael,
In list_isscat.htmpl this where clause dont works... Why?
id.[object_attrval]workflow_templates.task IN ('APP')
------------------------------
CA Service Desk Manager Especialist Developer
PROCERGS
Original Message:
Sent: 10-23-2015 11:38 AM
From: Michael Müller
Subject: Re: IN clause applied to QREL
Hi Giedrius.
This is my understanding:
you can use QREL's in a where clause, but there are some limitations and you need to use a special syntax.
the generic syntax looks like:
srel_attr.[back_srel_attr]brel_attr.search_attr IN ( .... )
where
- srel_attr : is an srel attribute of the factory you want to search in (fac1) , which refers to objects of another factory(fac2)
- back_srel_attr : is an srel attribute of fac2 which refers back to the same factory as the srel_attr of fac1 is reffering to (fac2)
- search_attr : is a whataever attribute of fac2 you want to compare your values to.
looks more complicate than it is , here is an example .Imagine you have a parent CI with a given UUID. This parent has some direct child CI's in bmhier. Now you want to get all cr's where the affected resource is a child CI of the given parent.
affected_resource.[child]parent_hier.parent IN ( U'1D5A46C05D491345B482810AC7C04E7E' )
- affected_resource : is the srel_attr
- parent_hier is the brel_attr, which more or less only defines the table/factory to join with, here bmhier
- child is the back_srel_attr which joins back to the affected resource of the cr's
- parent is the search_attr you want to compare to.
Hope that helps a bit.
kind regards
...............Michael