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     [SOLVED]NUMBER OF RECORDS IN TABLE vs. LINES

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]NUMBER OF RECORDS IN TABLE vs. LINES
 Login/Join
 
Gold member
posted
I have output that includes this:

 0 NUMBER OF RECORDS IN TABLE=       14  LINES=      9 


What's the difference between NUMBER OF RECORDS IN TABLE and LINES?

Thanks.

This message has been edited. Last edited by: <Emily McAllister>,


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 70 | Registered: April 27, 2012Report This Post
Virtuoso
posted Hide Post
I think &RECORDS is the variable the contains the number of records the request retrieved.  

&LINES is the variable that contains the number of lines in the answer set.

TABLE FILE CAR
SUM RCOST BY COUNTRY
END

will give you different LINES from
TABLE FILE CAR
PRINT RCOST BY COUNTRY
END

Same number retrieved but different number in the output.



WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Gold member
posted Hide Post
Okay, I think I see. So it seems the LINES value is determined by an aggregate function (SUM) in the query. In your first case, LINE will be the total number of COUNTRY, not the total number of records extracted by the query.

But what if your query has no aggregate function. Why would the numbers be different?

This example is similar to my actual code:

  
TABLE FILE ORDER_PAYMENTS
BY ORDER_KEY AS 'ORDER_NUMBER'
BY CUST_ID AS 'CUST_NUMBER'
WHERE ORDER_DT GE HADD((HGETC(8, 'HYYMDs')), 'DAY', -30, 8, 'HYYMDs');
WHERE INACTIVE_ACCT NE '1' OR INACTIVE_ACCT EQ MISSING;
WHERE ORDER_KEY IN &ORDER_KEY;
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS CUST_ORDERS FORMAT FOCUS INDEX ORDER_KEY
END



Note: &ORDER_KEY is a predetermined list of unique order numbers.

Thanks.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 70 | Registered: April 27, 2012Report This Post
Virtuoso
posted Hide Post
You have a WHERE test. Try the same code without the three WHERE's and you'll probably get the same number of Lines as Records.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Gold member
posted Hide Post
You are correct. When I comment the WHERE lines, the numbers are the same.

So it appears, similar to an aggregate function, a WHERE clause will also determine the value of LINES.

Thanks, this helps a lot.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 70 | Registered: April 27, 2012Report This Post
Platinum Member
posted Hide Post
It might being if WHERE not being translate to SQL. So answer set more big than final lines?

Kofi


Client Server 8.1.05: Apache; Tomcat;Windows Server 2012
Reporting Server 8.1.05; Oracle; MS SQL; Windows Server 2012
 
Posts: 106 | Registered: April 06, 2009Report This Post
Silver Member
posted Hide Post
Since there is no verb object included in the request, the output is aggregated by default, since each order number and customer number will only display one time, no matter how many records are extracted for that combination of values.


8009
Windows, HTML, AHTML, Excel
In FOCUS since 1983
 
Posts: 41 | Location: Charlotte, NC | Registered: January 06, 2012Report This Post
Platinum Member
posted Hide Post
Remember that WebFocus is building an internal matrix. The Records value display the number of records returned from the source. From some sources such as a flat file that could be everything. From other sources such as SQL it is selected data from the source. The Lines value displays the matrix rows to be output as the results of any manipulation to the matrix. As already commented there are multiple reasons why the values may not be the same.


WebFOCUS 7.7.05 (Someday 8)
Windows 7, All Outputs
In Focus since 1983.
 
Posts: 103 | Registered: April 27, 2011Report This Post
Gold member
posted Hide Post
Thanks Kofi, Joni and Kevin.

I think I got it now:

NUMBER OF RECORDS IN TABLE = total # of records extracted from source

LINES = # number of lines outputted (based on how the extracted records are manipulated by the query)


I will keep this in consideration in the future.

Thanks again.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 70 | Registered: April 27, 2012Report 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     [SOLVED]NUMBER OF RECORDS IN TABLE vs. LINES

Copyright © 1996-2020 Information Builders