Sorry about that.. had problems wiht my browser. (select distinct val_typ, ast_id, val_dt13, val_amt13, rlst_val_dt from (select distinct 'appraised_amt' as val_typ, ast_id, rlst_val_dt, case when rlst_val_eff_dt is null then rlst_val_dt when rlst_val_dt is not null and rlst_val_dt < rlst_val_eff_dt then rlst_val_dt else rlst_val_eff_dt end as val_dt13, apprs_val_amt as val_amt13 from DDWV01.rlst_val_dly where ((rlst_val_dt between '2013-01-01' and '2013-07-30' ) or (rlst_val_eff_dt between '2013-01-01' and '2013-07-30' ) ) and apprs_val_amt is not null union select distinct 'sale_amt' as val_typ, ast_id, sale_dt, sale_VAL_amt, rlst_val_dt from DDWV01.rlst_val_dly where (sale_dt between '2013-01-01' and '2013-07-30' ) and sale_VAL_amt is not null ) x ); quit;
... View more