[CLOSED] How to find a disimilar values based on a given column and show it on output
Hi, Lets take an example of CAR file : TABLE FILE CAR PRINT SEATS BY COUNTRY BY CAR BY MODEL WHERE COUNTRY EQ 'W GERMANY' WHERE CAR EQ 'BMW' END -RUN -EXIT
The output of the above will be : COUNTRY CAR MODEL SEATS W GERMANY BMW 2002 2 DOOR 5 2002 2 DOOR AUTO 4 3.0 SI 4 DOOR 5 3.0 SI 4 DOOR AUTO 5
Iam trying to get only the details where the Seats values are different(In this case i need to pull the Model : 2002 2 DOOR AUTO where the number of Seats are 4 which is uncommon among the rest of the values i.e.,5). Can anyone tell me how to get this done as this is very urgent?Any help is greatly appreciated.Thanks a lot in advance!This message has been edited. Last edited by: <Kathryn Henning>,
webfocus 769,windows 7,html
July 30, 2013, 07:03 AM
Tewy
What makes a value uncommon? When it occurs only once, twice?
For the example you give the following would work, but this is because I specify that I only want rows with distinct values in the column SEATS.
TABLE FILE CAR SUM CNT.SEATS NOPRINT BY SEATS NOPRINT PRINT SEATS BY SEATS NOPRINT BY MODEL BY COUNTRY BY CAR WHERE COUNTRY EQ 'W GERMANY' WHERE CAR EQ 'BMW' WHERE TOTAL CNT.SEATS EQ 1 END
Without a better understanding of how you define uncommon I can't be more help.
WF 7.6.11 Output: HTML, PDF, Excel
July 30, 2013, 01:08 PM
Doug
quote:
as this is very urgent
Isn't everything?
A better, more complete explanation, of your requirement would be very helpful.
From what I gather, from what you did say, I'd prompt for the dissimilar value (the value which I want do use in my dissimilar filtering) and use a NE in my table file request.
July 31, 2013, 04:06 PM
Rakesh P
Try something like this:
TABLE FILE CAR PRINT SEATS BY COUNTRY BY CAR RANKED BY SEATS WHERE COUNTRY EQ 'W GERMANY' WHERE CAR EQ 'BMW' END --
If you are using oracle, you can try RANK fucntion using Partition by clause to rank the elements based on the occurance.
Webfocus 7.1.6, Webfocus 7.7, Webfocus 8
July 31, 2013, 04:08 PM
Rakesh P
TABLE FILE CAR PRINT SEATS BY COUNTRY BY CAR RANKED BY LOWEST 1 SEATS WHERE COUNTRY EQ 'W GERMANY' WHERE CAR EQ 'BMW' END
Webfocus 7.1.6, Webfocus 7.7, Webfocus 8
August 01, 2013, 02:41 PM
susannah
TABLE FILE ibisamp/CAR SUM MAX.SEATS BY COUNTRY BY CAR PRINT SEATS BY COUNTRY BY CAR BY MODEL WHERE COUNTRY EQ 'W GERMANY' WHERE CAR EQ 'BMW' ON TABLE HOLD END TABLE FILE HOLD PRINT * WHERE E03 EQ E05 (or NE , whatever you want) END
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID