Pinned topic Return a distinct value from Table Domain
I have a table domain in Maximo 7 which I only want to return a distinct value. The LISTWHERECLAUSE only allows for the where clause of the select statement. Is it possible to get the domain to return a distinct value? Any examples greatly appreciated. Thanks.
badrimax 270001R4547 Posts
Re: Return a distinct value from Table Domain2010-04-14T02:14:13ZThis is the accepted answer. This is the accepted answer.Hi,
Add condition to your where clause like mentioned below
I have taken ALNDOMAIN example
alndomainid = (select max(alndomainid) from alndomain a where a.domainid = alndomain.domainid)
ALNDOMAINID is the uniqueid in the table
let me know if it works
Bunty28 270003KYBQ9 Posts
Re: Return a distinct value from Table Domain2011-01-04T08:10:18ZThis is the accepted answer. This is the accepted answer.I am also getting the same issue. I want Distinct Values in valuelist.
did you get the solution....Please let me if possible.
Thanks in advance..
JadeWarren 270001MKX21 Post
Re: Return a distinct value from Table Domain2015-07-09T15:24:34ZThis is the accepted answer. This is the accepted answer.
- sac1987 270006JHQQ
For a table domain on the MEASUREMENT table, referencing a few custom columns, this worked:
shiftid_gre = :shiftnum and route_gre = :route and round_gre is not null and measurementid in (select max(measurementid) from measurement where shiftid_gre = :shiftnum and route_gre = :route group by round_gre)
the key is the UNIQUEID in (select max(UNIQUEID) from TABLE where WHERE_CLAUSE_STUFF group by COLUMN_YOU_WANT_UNIQUE_VALUES_FOR)