Focal Point
Row Count

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2141090062

December 04, 2007, 04:29 AM
focuzsambit
Row Count
Guys,

Anybody having clue on the syntax to find no of rows in a master file.

<>

tks,
sam


WF Server: 7.1.4 on Z/OS and Linux, ReportCaster
Data: DB2, DB2/UDB, Adabas, SQL Server, Oracle Output: HTML,PDF,Excel2K
WF Client: Servlet, CGI
December 04, 2007, 05:08 AM
Tony A
Sam,

When you try and enter code or carat characters place it between [ code] and [/code] (no spaces) otherwise we will not see your entire post.

So you want to know how to produce the same output as Count(*) in Oracle?

Well -
SQL
  SELECT COUNT(*)
    FROM oracletable
   WHERE clauses etc.
;
TABLE FILE SQLOUT
PRINT E01/I9
END
will do it .... or -
TABLE FILE synonym_name
   WRITE CNT.fieldname/I9
or SUM CNT.fieldname/I9
or ADD CNT.fieldname/I9
or COUNT fieldname/I9
END

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
December 04, 2007, 06:28 AM
focuzsambit
any clue on &LINES funda ??


WF Server: 7.1.4 on Z/OS and Linux, ReportCaster
Data: DB2, DB2/UDB, Adabas, SQL Server, Oracle Output: HTML,PDF,Excel2K
WF Client: Servlet, CGI
December 04, 2007, 06:42 AM
FrankDutch
F..

&LINES and &RECORDS are amper variables.
You get the result after the report

So

-SET &ECHO=ALL;
TABLE FILE synonym_name
   WRITE CNT.fieldname/I9
or SUM CNT.fieldname/I9
or ADD CNT.fieldname/I9
or COUNT fieldname/I9
ON TABLE HOLD
END
-TYPE &LINES


Will show you how many lines you have in the report, and then you can test if this is what you want.
PE if the result would be 10.000 you may decide to not print it, because that would print a little book.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7