Topic
  • 4 replies
  • Latest Post - ‏2015-07-09T15:24:34Z by JadeWarren
jn-taic
jn-taic
4 Posts

Pinned topic Return a distinct value from Table Domain

‏2010-04-13T12:48:00Z |
Hi,

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.
Updated on 2011-01-04T08:10:18Z at 2011-01-04T08:10:18Z by Bunty28
  • badrimax
    badrimax
    7 Posts

    Re: Return a distinct value from Table Domain

    ‏2010-04-14T02:14:13Z  
    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

    Regards
    Badri
  • Bunty28
    Bunty28
    9 Posts

    Re: Return a distinct value from Table Domain

    ‏2011-01-04T08:10:18Z  
    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..
  • sac1987
    sac1987
    8 Posts

    Re: Return a distinct value from Table Domain

    ‏2013-10-28T09:37:33Z  

    I am also getting the same issue. Please suggest any solution.

    Thanks

  • JadeWarren
    JadeWarren
    1 Post

    Re: Return a distinct value from Table Domain

    ‏2015-07-09T15:24:34Z  
    • sac1987
    • ‏2013-10-28T09:37:33Z

    I am also getting the same issue. Please suggest any solution.

    Thanks

    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)