ArticlesArticles Most Helpful ArticlesMost Helpful Articles Language SettingsLanguage Settings LoginLogin
RSS Feeds
DrillDown Icon Table of Contents
DrillDown Icon MX
DrillDown Icon MANUALS and Other Info for SQL MANEX Client Server
DrillDown Icon Customer Relationship Management (CRM)
DrillDown Icon ManEx Minute
DrillDown Icon ManEx Component Exchange
DrillDown Icon ManEx Supplier Directory & Rankings
  Email This ArticlePrint PreviewPrint Current Article and All Sub-Articles
 
ICM Query - PO History Button Sequel Statement

Here is the sequel statement that generates the information in the PO History button from the inventory page 2 screen.  The uniq_key is the field identifying the part you are looking for.  In this sequel, records are gathered up to ten records. You can change the sequel if you would like less records.

SELECT TOP 10 Pomain.podate, Supinfo.supname, Pomain.ponum,;
  Poitems.partmfgr, Poitems.costeach, Poitems.ord_qty, Poitems.mfgr_pt_no;
FROM ;
    manex!pomain,;
    manex!supinfo,;
    manex!poitems;
 WHERE ( ( (  Pomain.ponum == Poitems.ponum;
   AND  Supinfo.uniqsupno == Pomain.uniqsupno );
   AND  Poitems.uniq_key == ( ?gUniq_key ) );
   AND  NOT (Poitems.lcancel ) );
   AND  (  Pomain.postatus = ( "OPEN" );
   OR  Pomain.postatus = ( "CLOSED" ) );
 ORDER BY Pomain.podate DESC
Article ID: 3206