Focal Point
[SOLVED] How to select distinct sequential numbers

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

July 24, 2009, 11:29 AM
Pku
[SOLVED] How to select distinct sequential numbers
Hi everyone,

I have a problem with selecting distinct sequence (SEQ) numbers as in the following example:
  
DCN         SEQ
00010       002
00010       002
00010       001
00010       002
00010       003
00010       004
00010       004
00010       004
00010       003
00010       004
00020       002
00020       002
00020       003
00020       004
00020       004
00020       002
00020       005

I would like the result has the distinct squential numbers as following:

DCN         SEQ
00010       001
00010       002
00010       003
00010       004
00020       002
00020       003
00020       004
00020       005


Thanks,
PPku

This message has been edited. Last edited by: Kerry,


Thanks,
Pku

Focus, WebFocus 8201 on Windows
July 24, 2009, 11:46 AM
GinnyJakes
TABLE FILE CAR
PRINT DST.RETAIL_COST
BY COUNTRY
BY CAR 
END

Use the DST. prefix operator.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
July 24, 2009, 02:58 PM
Pku
Thanks, Ginny.

I got it by using a hold file.
  
TABLE FILE SAMPLE
PRINT
  DST.DCN
  SEQ
BY DCN NOPRINT
BY SEQ NOPRINT
ON TABLE HOLD AS HOLD1
END

TABLE FILE HOLD1
SUM
 DCN
 SEQ
BY SEQ NOPRINT
BY DCN NOPRINT
END


Pku

This message has been edited. Last edited by: Pku,


Thanks,
Pku

Focus, WebFocus 8201 on Windows
July 25, 2009, 02:29 PM
Danny-SRL
Pku,

If all you need is the list of DCNs and of distinct SEQs you could do:
  
TABLE FILE SAMPLE
BY DCN
BY SEQ
END



Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF