518: if(regid_proc = true) then
519: insert into hz_application_trans_gt(app_id,party_id) select 8405, temp.party_id from hz_purge_gt temp where
520:
521:
522: exists (select 'Y' from HZ_EDUCATION
523: xx where xx.PARTY_ID = temp.party_id
524: and (nvl(STATUS, 'A') in ('A','I'))
525: and exists
526: (select 'Y' from IGS_AD_HZ_ACAD_HIST
525: and exists
526: (select 'Y' from IGS_AD_HZ_ACAD_HIST
527: yy where yy.EDUCATION_ID=xx.EDUCATION_ID
528: ))
529: or exists (select 'Y' from HZ_EDUCATION
530: xx where xx.SCHOOL_PARTY_ID = temp.party_id
531: and (nvl(STATUS,'A') in ('A','I'))
532: and exists
533: (select 'Y' from IGS_AD_HZ_ACAD_HIST
556: (select 'Y' from IGS_AD_HZ_EXTRACURR_ACT
557: yy where yy.PERSON_INTEREST_ID=xx.PERSON_INTEREST_ID
558: ))
559:
560: or exists (select 'Y' from HZ_EDUCATION
561: xx where xx.PARTY_ID = temp.party_id
562: and (nvl(STATUS, 'A') in ('A','I'))
563: and exists
564: (select 'Y' from IGS_AD_TRANSCRIPT
563: and exists
564: (select 'Y' from IGS_AD_TRANSCRIPT
565: yy where yy.EDUCATION_ID=xx.EDUCATION_ID
566: ))
567: or exists (select 'Y' from HZ_EDUCATION
568: xx where xx.SCHOOL_PARTY_ID = temp.party_id
569: and (nvl(STATUS,'A') in ('A','I'))
570: and exists
571: (select 'Y' from IGS_AD_TRANSCRIPT
598: else
599: delete from hz_purge_gt temp where
600:
601:
602: exists (select 'Y' from HZ_EDUCATION
603: xx where xx.PARTY_ID = temp.party_id
604: and (nvl(STATUS, 'A') in ('A','I'))
605: and exists
606: (select 'Y' from IGS_AD_HZ_ACAD_HIST
605: and exists
606: (select 'Y' from IGS_AD_HZ_ACAD_HIST
607: yy where yy.EDUCATION_ID=xx.EDUCATION_ID
608: ))
609: or exists (select 'Y' from HZ_EDUCATION
610: xx where xx.SCHOOL_PARTY_ID = temp.party_id
611: and (nvl(STATUS,'A') in ('A','I'))
612: and exists
613: (select 'Y' from IGS_AD_HZ_ACAD_HIST
636: (select 'Y' from IGS_AD_HZ_EXTRACURR_ACT
637: yy where yy.PERSON_INTEREST_ID=xx.PERSON_INTEREST_ID
638: ))
639:
640: or exists (select 'Y' from HZ_EDUCATION
641: xx where xx.PARTY_ID = temp.party_id
642: and (nvl(STATUS, 'A') in ('A','I'))
643: and exists
644: (select 'Y' from IGS_AD_TRANSCRIPT
643: and exists
644: (select 'Y' from IGS_AD_TRANSCRIPT
645: yy where yy.EDUCATION_ID=xx.EDUCATION_ID
646: ))
647: or exists (select 'Y' from HZ_EDUCATION
648: xx where xx.SCHOOL_PARTY_ID = temp.party_id
649: and (nvl(STATUS,'A') in ('A','I'))
650: and exists
651: (select 'Y' from IGS_AD_TRANSCRIPT