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.
I have a guided ad-hoc report, which is build on several views joined together. Depending on how many fields are selected to be displayed I am getting duplicate rows in the output report. Is there a way to specify to return only distinct values in the guided ad-hoc report? This is the sample code of the report, which includes 1 sort section and 4 details sections: ( ... more fields here - is not actually in the report but to make a point it is just subset of fields selected)
TABLE FILE VF_APP_SEQ_EVENT_ADHOC PRINT &RP_FN09P_Detail9.(AND( ... more fields here).Please select detail field(s). &RP_FN14P_Detail14.(AND() ... more fields here).Please select detail field(s). &RP_FN41P_Detail41.(AND() ... more fields here).Please select detail field(s). &RP_FN62P_Detail62.(AND() ... more fields here).Please select detail field(s). BY LOWEST &RP_FN01B_Sort1.(BY() ... more fields here).Please select sort field(s). ON TABLE SET ONFIELD IGNORE ON TABLE SET PAGE-NUM NOLEAD ON TABLE SET ASNAMES ON ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON
The WebFocus generated SLQ statement is as follows: SELECT T1."APP_COUNTRY_ID", T1."PRODUCT_FAMILY_ID", ... more fields here T19."NAME", FROM ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( vf_app_seq_event T1 INNER JOIN DM.VF_CTXT_APP_PRODUCT T3 ON (T3."APPLICATION_ID" = T1."APPLICATION_ID") ) LEFT OUTER JOIN DM.VD_PRODUCT T4 ON T4."PRODUCT_ID" = T3."PRODUCT_ID" ) INNER JOIN DM.VF_CTXT_APP_COUNTRY T6 ON (T6."APPLICATION_ID" = T1."APPLICATION_ID") ) LEFT OUTER JOIN DM.VD_COUNTRY T7 ON T7."COUNTRY_ID" = T6."COUNTRY_ID" ) LEFT OUTER JOIN DM.VD_COUNTRY T8 ON T8."COUNTRY_ID" = T1."SEQ_COUNTRY_ID" ) LEFT OUTER JOIN DM.VD_EVENT_COUNTRY T9 ON T9."EVENT_COUNTRY_ID" = T1."EVENT_COUNTRY_ID" ) LEFT OUTER JOIN DM.VD_COUNTRY T10 ON T10."COUNTRY_ID" = T9."EVENT_COUNTRY_ID" ) LEFT OUTER JOIN DM.VD_EVENT T11 ON T11."EVENT_ID" = T1."EVENT_ID" ) LEFT OUTER JOIN DM.VF_COMMENT T12 ON T12."ASSOCIATED_ENTITY_ID" = T11."EVENT_ID" ) LEFT OUTER JOIN DM.VF_PRODUCT_EVENT T13 ON T13."EVENT_ID" = T11."EVENT_ID" ) LEFT OUTER JOIN DM.VD_PRODUCT T14 ON T14."PRODUCT_ID" = T13."PRODUCT_ID" ) LEFT OUTER JOIN DM.VD_SEQUENCE T15 ON T15."SEQUENCE_ID" = T1."SEQUENCE_ID" ) LEFT OUTER JOIN DM.VF_COMMENT T16 ON T16."ASSOCIATED_ENTITY_ID" = T15."SEQUENCE_ID" ) LEFT OUTER JOIN DM.VD_APPLICATION T17 ON T17."APPLICATION_ID" = T1."APPLICATION_ID" ) LEFT OUTER JOIN DM.VF_COMMENT T18 ON T18."ASSOCIATED_ENTITY_ID" = T17."APPLICATION_ID" ) LEFT OUTER JOIN DM.VD_PRODUCT_FAMILY T19 ON T19."PRODUCT_FAMILY_ID" = T1."PRODUCT_FAMILY_ID" ) LEFT OUTER JOIN DM.VD_APP_COUNTRY T20 ON T20."APP_COUNTRY_ID" = T1."APP_COUNTRY_ID" ) ORDER BY T19."NAME", T17."IDENTIFICATION_CODE", T17."NAME", T15."NAME", T15."IDENTIFICATION_CODE", T11."IDENTIFICATION_CODE", T11."NAME", T7."NAME";
Is there a way to specify either in the report or join to bring only distinct values, so the generated SQL contains: select distinct?This message has been edited. Last edited by: ElizabethN,
You are doing a "detail" report (PRINT) so it will give you every single row that matches your filtering criteria.
Getting more or less records depending on the fields actually chosen when running the request is probably due to your 20 joins there. One or more of them is causing your data to be duplicated which may or may not be a correct scenario for you.
One way to get rid of duplicates is to switch your report into a summary one (SUM) and moving the selected fields down to the BY section, but I would actually look into your data and joins first!