Try this...
select a.*;
from CodeTable a;
where a.ddate in;
( select max( b.ddate );
from CodeTable b;
where b.cparentid = a.cparentid )
by using the subquery to qualify only the
maximum date for the current parent ID, only
those records in the outer query with that date
will be accepted in final query...
You may have to adjust this a bit in case there
are more than 1 Code/Cdesc combination with
entries on the same date.
HTH