C
c_programmer
I have a problem.
There is a effective dated list FAMILY_ACCOUNTS stored in the memory.
How to achieve the equivalent of the following SQL statement:
select * from FAMILY_ACCOUNTS FA
where EFFECTIVE_DATE =
(select max(EFFECTIVE_DATE) from FAMILY_ACCOUNTS FA2 where
FA.FAMILY_ACCOUNTS_KEY = FA2.FAMILY_ACCOUNTS_KEY)
and EFFECTIVE_STATUS ="ACTIVE"
and EFFECTIVE_DATE <= given_date
and FAMILY_ACCOUNTS_KEY = given_key
using bsearch and qsort?
There is a effective dated list FAMILY_ACCOUNTS stored in the memory.
How to achieve the equivalent of the following SQL statement:
select * from FAMILY_ACCOUNTS FA
where EFFECTIVE_DATE =
(select max(EFFECTIVE_DATE) from FAMILY_ACCOUNTS FA2 where
FA.FAMILY_ACCOUNTS_KEY = FA2.FAMILY_ACCOUNTS_KEY)
and EFFECTIVE_STATUS ="ACTIVE"
and EFFECTIVE_DATE <= given_date
and FAMILY_ACCOUNTS_KEY = given_key
using bsearch and qsort?