Focal Point
FOCUS

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

February 01, 2007, 12:14 AM
<Raghuraman>
FOCUS
Hi
I have focus file like a
eeid stype client
01 A aa
01 B bb
02 B bb
03 A aa
03 B bb
03 C cc

I want retrive the data from the file based on stype condition
First i check the stype 'A' if it is true it will display the 'A' related records only no need to other stype but it doesn't have 'A' it goes to second one 'B' if it is true it will display the 'B' related records only no need to other stype and same as 'C' type also
How to retrive the records

Please tell me how to solve this problem
February 01, 2007, 04:51 AM
<Parag Khanvilkar>
Hi Raghuraman,

you can write Table File Statements to Display records like
TABLE FILE FILE1
PRINT EEID
STYPE
CLIENT
IF STYPE EQ A
END

-IF &LINES NE 0 GOTO EXIT;

TABLE FILE FILE1
PRINT EEID
STYPE
CLIENT
IF STYPE EQ B
END

-IF &LINES NE 0 GOTO EXIT;


TABLE FILE FILE1
PRINT EEID
STYPE
CLIENT
IF STYPE EQ C
END

-EXIT

FINISH

Hope this will help

Regards,
Parag.
February 01, 2007, 05:03 AM
Tewy
This will give you the first value of STYPE for each record by eeid.

TABLE FILE yourfile
SUM
client
BY eeid
BY LOWEST 1 stype
END


WF 7.6.11
Output: HTML, PDF, Excel
February 01, 2007, 08:42 AM
Francis Mariani
It's hard to focus when the topic title is "FOCUS". It might be a good idea to use a more descriptive title.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
February 01, 2007, 09:13 AM
Tony A
It looks to me like there's a new set of recruits and we're giving the training again!!