Hi all,
i have a reqeriment like this
let say i have 2 columns no1 is the surrogate key column
no1 no2
1 5
1 2
1 8
2 8
2 5
2 6
i want find the min value of the particular surrogate key
i know to do in the remove duplicates stage and sort
but i want to know how to find in the transformer it self
please if anyone knows give me reply
that was very helpful to me
Thanks
to find the min value
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 70
- Joined: Thu Nov 09, 2006 2:14 am
to find the min value
Srini
-
- Participant
- Posts: 78
- Joined: Fri Mar 02, 2007 4:54 am
- Location: CHENNAI
First you can sort the columns in ASC giving priority to 1st col and then 2nd.
After sorting consider your target file as Hash lookup.
Output.Col1=AfterSort.Row_Id
Output.Col2=VarRowTemp
Where VarRowTemp is :-
"If VarRowPrev <> VarRowCurr Then AfterSort.Row_Val Else "N""
VarRowPrev = VarRowCurr
VarRowCurr = AfterSort.Row_Id
Note: In hash lookup put constraint as "VarRowTemp <> "N" "
After sorting consider your target file as Hash lookup.
Output.Col1=AfterSort.Row_Id
Output.Col2=VarRowTemp
Where VarRowTemp is :-
"If VarRowPrev <> VarRowCurr Then AfterSort.Row_Val Else "N""
VarRowPrev = VarRowCurr
VarRowCurr = AfterSort.Row_Id
Note: In hash lookup put constraint as "VarRowTemp <> "N" "
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: