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.
Hi I've written next focus code: TABLE FILE WF_1_TRANSACTION SUM 'CNT.WF_1_TRANSACTION.WF_1_TRANSACTION.TRANS_ID' AS 'COUNT,TRANS_ID' 'WF_1_COMPANY.WF_1_COMPANY.NAME' BY 'WF_1_TX_TYPE.WF_1_TX_TYPE.TYPE_NAME' BY TOTAL HIGHEST 10 'CNT.WF_1_TRANSACTION.WF_1_TRANSACTION.TRANS_ID' AS 'COUNT,TRANS_ID' BY 'WF_1_COMPANY.WF_1_COMPANY.ID' END
End the output result was: TYPE_NAME | COUNT TRANS_ID | ID | COUNT TRANS_ID | NAME Availability searches 256 29 256 Promess Ltd 261 44 261 Intapeople-IT Recruitment 269 31 269 Quayline Digital 283 30 283 Firesafe Technical 289 11 289 Vented Services Ltd 64 26 64 Intec Enquiry Agency 95 28 95 Donberg Electronics Ltd 100 46 100 Barnyard Pine 103 9 103 Ethos Corporation Ltd 107 21 107 James Hartley Ltd Carriers Tracked 279 29 279 Promess Ltd 281 18 281 Craft Metal Products 31 281 Quayline Digital 306 11 306 Vented Services Ltd ...
Why the "COUNT TRANS_ID" column (namely values 256, 261, 269, 283, 289, 64, 95,...) is not sorted descending as i expect it should??
And some more newbie questions: why when I turn off the option "Qualified names" then if 2 tables (joined) have 2 identical column names, webfocus can choose not the right one and hence the report will be wrong? And why qualified names are something like WF_1_TX_TYPE.WF_1_TX_TYPE.TYPE_NAME instead of WF_1_TX_TYPE.TYPE_NAME.
Why the "COUNT TRANS_ID" column (namely values 256, 261, 269, 283, 289, 64, 95,...) is not sorted descending as i expect it should??
Remove the TOTAL from BY TOTAL HIGHEST 10 'CNT.WF_1_TRANSACTION.WF_1_TRANSACTION.TRANS_ID'
quote:
And some more newbie questions: why when I turn off the option "Qualified names" then if 2 tables (joined) have 2 identical column names, webfocus can choose not the right one and hence the report will be wrong?
That is correct, and that is why we have fully qualified names.
quote:
And why qualified names are something like WF_1_TX_TYPE.WF_1_TX_TYPE.TYPE_NAME instead of WF_1_TX_TYPE.TYPE_NAME.
We use the filename.segment name.fieldname to prevent the selection of an incorrect field.
Hope this helps.
Cheers,
Kerry
Kerry Zhan Focal Point Moderator Information Builders, Inc.
Posts: 1948 | Location: New York | Registered: November 16, 2004
Remove the TOTAL from BY TOTAL HIGHEST 10 'CNT.WF_1_TRANSACTION.WF_1_TRANSACTION.TRANS_ID'
But isn't TOTAL connected with CNT. ? Because when I remove it then in drop-down list for BY I've got only BY and ALL instead of SUM, CNT, etc..
Have one more question. TABLE FILE HOLD1 PRINT 'HOLD1.HOLD1.NAME' 'HOLD1.HOLD1.TRANS_ID' AS 'count of tx for the type' BY 'HOLD1.HOLD1.TYPE_NAME' AS 'TX_TYPE_NAME' BY HIGHEST 10 'HOLD1.HOLD1.TRANS_ID' NOPRINT END
I want to limit the number of records in each group to 10. But when there are equal TRANS_ID numbers in the group - the number of records increased so the number of records variates from 10 to 12 and more. How can I eliminate this to have exactly 10 records?
Your examples work, but unfortunately I need slighty differnent. In your case rows where WHERE TOTAL SALARY NE LAST SALARY simply not displayed. I need them to display! Let me describe what I need. Say, I have a table with 2 columns: name and age. For example I need to display 10 oldest persons, sorting them by their ages descending.
If use such code
TABLE FILE A PRINT name BY HIGHEST 10 age END
then if it is 2 persons with the same age - ... They will be grouped. How to solve this problem? Or may be there is a different approach? Thanks.This message has been edited. Last edited by: xonixx,
The problem is that you want to create two unrelated groups: 1) 10 ages 2) but you may have 12 people (two with the same age) , Since names will be printed and you want only 10 lines of output, which name(s) do you want to lose?
Both examples were given earlier. If you need additional assistance, please contact Information Builders' Customer Support Services and open a case for it, then we can do a desktop streaming session with you. You may either call at 1-800-736-6130, or access the online system InfoResponse at http://techsupport.ibi.com. Here is a list of information to be ready when you call: http://techsupport.ibi.com/before_you_call.jsp.
Hope this helps.
Cheers,
Kerry
Kerry Zhan Focal Point Moderator Information Builders, Inc.
Posts: 1948 | Location: New York | Registered: November 16, 2004
The code in your initial post looks correct, I'm just not sure why all the single quote marks are there around the field names. Shouldn't be a problem. . Was that generated by a GUI tool?
If you are not getting the top 10 values in descending order I'd want to see some sort of traces to figure out what is happening... if this persists, I'd open a case with the Tech Support site.
ttfn, kp
Access to most releases from R52x, on multiple platforms.
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003
The code is correct, it is geberated by the gui tool and it works just as expected. The problem is that I can't find the way to obtain 10 rows rather than 10 groups (that can be definitely more then 10 rows)