Automate

 View Only
  • 1.  Highest value in Query in Composer

    Posted 03-19-2019 17:05
    I need to run a query against the MARA table to pull in the material numbers for plant maintenance spare parts, but I only need the highest number or last created number. Is there a way to perform this in Composer using an XML formatted query? Thanks.

    ------------------------------
    Stephen Forte | Sr MDM Analyst
    Refresco Beverages North America, Inc.
    ------------------------------


  • 2.  RE: Highest value in Query in Composer

    Posted 03-20-2019 11:26
    This would be the SQL equivalent of a TOP clause. I don't think Query has that directly. I've been able to mimic it in certain cases where the tables joined have a date column (like Validity Date) that can be used as additional criteria. More often, I setup my Queries to pull back a larger data set into Excel or SQL, then use additional statements to filter down from there.

    It would be interesting to know if there was another approach.

    ------------------------------
    Joshua Whitener | Winshuttle Evangelist
    Exxon Mobil Corporation | 8326258441
    ------------------------------