Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] How do you do DISTINCT?
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] How do you do DISTINCT?
 Login/Join
 
Silver Member
posted
So the idea here is to print out ITEM information from F4101/F4102 where the item is in use in a WO in F4801 within particular workcenters. But this is going to print out the same items many times. How can I tell it to only print distinct rows?

-SET &SAVPATH = 'D:\RPT2.xls';

JOIN WAITM IN F4801
  TO IMITM IN F4101 AS J0
END
JOIN IMITM IN F4801
  TO IBITM IN F4102 AS J1
END

TABLE FILE F4801
PRINT
IBLITM        AS 'PartNumber'
IBMCU         AS 'Branch'
IBRPRC_CODE   AS 'SubFamilyCode'
IBRPRC_DESC   AS 'SubFamilyCodeDesc'
IBPRP1_CODE   AS 'FamilyCode'
IBPRP1_DESC   AS 'FamilyCodeDesc'
IBSRP5_CODE   AS 'FamilyCodeX'
IBSRP5_DESC   AS 'FamilyCodeXDesc'
IBGLPT_CODE   AS 'GLDescription'
IBGLPT_DESC_1   AS 'GLDescriptionDesc'
IMDSC1        AS 'UtemDesc1'
IMDSC2        AS 'UtemDesc2'
WHERE WAMCU EQ '         WC1'
OR    WAMCU EQ '         WC2'
OR    WAMCU EQ '         WC3'
ON TABLE SAVE FILENAME ACCPRODRPT.XLS  FORMAT EXCEL
END
-RUN

-WINNT COPY ACCPRODRPT.XLS &SAVPATH;
END
-RUN

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 7.6.9
Windows
all output (Excel, HTML, PDF)
 
Posts: 42 | Registered: April 29, 2010Reply With QuoteReport This Post
Virtuoso
posted Hide Post
A quick solution to it is to change your PRINT verb for a SUM. Try the code below and tweak as needed:

TABLE FILE F4801
SUM
        MAX.IBMCU         AS 'Branch'
        MAX.IBRPRC_CODE   AS 'SubFamilyCode'
        MAX.IBRPRC_DESC   AS 'SubFamilyCodeDesc'
        MAX.IBPRP1_CODE   AS 'FamilyCode'
        MAX.IBPRP1_DESC   AS 'FamilyCodeDesc'
        MAX.IBSRP5_CODE   AS 'FamilyCodeX'
        MAX.IBSRP5_DESC   AS 'FamilyCodeXDesc'
        MAX.IBGLPT_CODE   AS 'GLDescription'
        MAX.IBGLPT_DESC_1   AS 'GLDescriptionDesc'
        MAX.IMDSC1        AS 'UtemDesc1'
        MAX.IMDSC2        AS 'UtemDesc2'
BY IBLITM                 AS 'PartNumber'
WHERE WAMCU EQ '         WC1'
OR    WAMCU EQ '         WC2'
OR    WAMCU EQ '         WC3'
ON TABLE SAVE FILENAME ACCPRODRPT.XLS  FORMAT EXCEL
END
-RUN



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Reply With QuoteReport This Post
Master
posted Hide Post
You can also use below code.
TABLE FILE F4801
BY IBLITM        AS 'PartNumber'
BY IBMCU         AS 'Branch'
BY IBRPRC_CODE   AS 'SubFamilyCode'
BY IBRPRC_DESC   AS 'SubFamilyCodeDesc'
BY IBPRP1_CODE   AS 'FamilyCode'
BY IBPRP1_DESC   AS 'FamilyCodeDesc'
BY IBSRP5_CODE   AS 'FamilyCodeX'
BY IBSRP5_DESC   AS 'FamilyCodeXDesc'
BY IBGLPT_CODE   AS 'GLDescription'
BY IBGLPT_DESC_1   AS 'GLDescriptionDesc'
BY IMDSC1        AS 'UtemDesc1'
BY IMDSC2        AS 'UtemDesc2'
WHERE WAMCU EQ '         WC1'
OR    WAMCU EQ '         WC2'
OR    WAMCU EQ '         WC3'
ON TABLE SAVE FILENAME ACCPRODRPT.XLS  FORMAT EXCEL
END
-RUN

Thanks,
Ram
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] How do you do DISTINCT?

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.