hi my input
Claim_id line_num adj_type
1 01 80
1 02 80
1 03 80
2 01 80
2 02 80
2 01 83
2 02 83
3 97 84
3 98 84
3 99 84
4 92 84
4 93 84
5 01 80
5 01 83
5 95 84
6 01 80
6 02 80
7 01 80
7 01 83
7 02 80
7 02 83
7 92 84
7 93 84
7 94 84
my output shuld be
claim_id lin_no adj_ty
1 01 80
1 02 80
1 03 80
3 97 84
3 98 84
3 99 84
4 92 84
4 93 84
6 01 80
6 02 80
plz help
need logic
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
hi,
thanks for replying.
my input has three columns1)claim_id 2)line_nu 3)adj_type
all of them are varchar(10).
there are three types of adj_types1)80 2)83 3)84
in my input each particular claim_id has adj_type either 80 or 83 or 84 or combination of all of them(80,83,84) or combination of any two of them(80,83
and 80,84).
i need out put where a particular claim_id has no multiple adj_types, i.e if a particular claim_id has adj_type 80 and also if the same particular claim_id has adj_type 83 or 84, i do not want them in my output.
my out put should have claim_id's which have only one kind of adj_type either 80 or 83 or 84. out put claim_id should not have combination of these adj_types.
source-->sequential file
target--> sequential file
thank you
thanks for replying.
my input has three columns1)claim_id 2)line_nu 3)adj_type
all of them are varchar(10).
there are three types of adj_types1)80 2)83 3)84
in my input each particular claim_id has adj_type either 80 or 83 or 84 or combination of all of them(80,83,84) or combination of any two of them(80,83
and 80,84).
i need out put where a particular claim_id has no multiple adj_types, i.e if a particular claim_id has adj_type 80 and also if the same particular claim_id has adj_type 83 or 84, i do not want them in my output.
my out put should have claim_id's which have only one kind of adj_type either 80 or 83 or 84. out put claim_id should not have combination of these adj_types.
source-->sequential file
target--> sequential file
thank you
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
Use stages in the below order to get your result:
Set the 'change keys' in sort stage and use them as flags/indicatrs in transformer. Keep appending similar records (Which you found with change key indicators) in stage variable and set another indicator in the transformer when ever your criteria are breached. Capture only the last duplicate record and then filter on indicator in the transformer in filter stage.
Src --> Sort --> Transformer --> Remove Duplicate --> Filter -->Target
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>