try:open cur_cp_cx;
fetch cur_cp_cx into v_tzid;
    while cur_cp_cx %found loop 
       select max(cpjd_id) into v_cpjdid from CP_JBXX where tz_id=v_tzid;
       select cp_isn,cp_nm into v_cpisn,v_cpnm from CP_JBXX where cpjd_id=v_cpjdid and tz_id=v_tzid;
     insert into TP_CP_CX(cp_isn,tz_id,cp_nm,cpjd_id) values  (v_cpisn,v_tzid,v_cpnm,v_cpjdid);
fetch cur_cp_cx into v_tzid;
  end loop;