Sequential file problem
Posted: Sat Apr 21, 2007 5:00 am
Hi Everybody,
I have one seq file of 200-250 records, and one of the columns is time column having different values like '14:58:59'. I also have one oracle table with three records like
Col1 Col2
15:00:00 PM, A
17:00:00 PM, B
19:00:00 PM, C
Now i want to compare every time field of file with the time field of oracle table such that :
if File.Time > 15:00:00 And File.Time < 17:00:00 then A
if File.Time > 17:00:00 And File.Time < 19:00:00 then B
if File.Time > 19:00:00 then C
For this i have wrote one transformation routine where i am taking all three records of table in one seq file and in routine reading that file and putting Col1 values in one array & Col2 values in second array.
Then for every incoming time field i am comparing it with Array 1 values & returning corresponding Array2 values.
Is this right way or some other ways are also possible.
Any solution will be appreciable.
I have one seq file of 200-250 records, and one of the columns is time column having different values like '14:58:59'. I also have one oracle table with three records like
Col1 Col2
15:00:00 PM, A
17:00:00 PM, B
19:00:00 PM, C
Now i want to compare every time field of file with the time field of oracle table such that :
if File.Time > 15:00:00 And File.Time < 17:00:00 then A
if File.Time > 17:00:00 And File.Time < 19:00:00 then B
if File.Time > 19:00:00 then C
For this i have wrote one transformation routine where i am taking all three records of table in one seq file and in routine reading that file and putting Col1 values in one array & Col2 values in second array.
Then for every incoming time field i am comparing it with Array 1 values & returning corresponding Array2 values.
Is this right way or some other ways are also possible.
Any solution will be appreciable.