Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


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

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[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, 2010Report 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, 2005Report 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, 2009Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

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

Copyright © 1996-2020 Information Builders