Friends,
I think my earlier post went deviated from my expectations and I would to rephrase the question in simple terms.
I have a table with large number of rows. The fields are Policy_num, Eff_date, ...
For an input date range (Eff_date), I need to extract the Policy_nums. After that I need to select the records with these Policy_nums. I cannot apply the date criteria on whole table as it gives me the records with latest Eff_date where as I need the records with oldest Eff_date.
Currenly I did it as a DB2 SQL subselect but it is consuming lot of CPU to run. I am not sure of DB2 stored procedures. So I am just looking for ways to implement in SAS.
Please help.
Thanks.
I think my earlier post went deviated from my expectations and I would to rephrase the question in simple terms.
I have a table with large number of rows. The fields are Policy_num, Eff_date, ...
For an input date range (Eff_date), I need to extract the Policy_nums. After that I need to select the records with these Policy_nums. I cannot apply the date criteria on whole table as it gives me the records with latest Eff_date where as I need the records with oldest Eff_date.
Currenly I did it as a DB2 SQL subselect but it is consuming lot of CPU to run. I am not sure of DB2 stored procedures. So I am just looking for ways to implement in SAS.
Please help.
Thanks.