Hash File lookup
Posted: Mon Apr 04, 2005 10:38 pm
I have a situation like like this with 2 hash files that I am performing a lookup:
File 1:
DateCol
D1
D1
D2
D3
D4
D5.....
File 2
DtStrt DtEnd
D11 D12
D13 D14
D15 D16
D21 D22
D23 D24...
Where D1,D2,D3,D4 are the dates which come in the range between DtStrt and DtEnd.
All I have to do is see in which range does each date from file fall and then pick the corresponding Dtstrt date.
Eg., if D2 comes between D15 and D16, then pass D15 as output.
I tried using 2 has files and it not giving me the right result. Not getting the right result. Any help is appreciated.
Thanks in advance
Kumar
File 1:
DateCol
D1
D1
D2
D3
D4
D5.....
File 2
DtStrt DtEnd
D11 D12
D13 D14
D15 D16
D21 D22
D23 D24...
Where D1,D2,D3,D4 are the dates which come in the range between DtStrt and DtEnd.
All I have to do is see in which range does each date from file fall and then pick the corresponding Dtstrt date.
Eg., if D2 comes between D15 and D16, then pass D15 as output.
I tried using 2 has files and it not giving me the right result. Not getting the right result. Any help is appreciated.
Thanks in advance
Kumar