[Home] [Help]
113: cursor get_hierarchy_csr
114: ( v_user_sequence number,
115: v_intf_type varchar2) IS
116: SELECT TERR_NAME, trim(HIERARCHY) hierarchy, ORG_ID, org_name
117: FROM JTY_WEBADI_OTH_TERR_INTF
118: where user_sequence = v_user_sequence
119: and interface_type = v_intf_type
120: and header = 'TERR'
121: and lay_seq_num is not null
135: BEGIN
136:
137: x_return_status := FND_API.G_RET_STS_SUCCESS;
138: /*
139: update JTY_WEBADI_OTH_TERR_INTF
140: set parent_terr_id = null
141: where user_sequence = p_user_sequence
142: and interface_type = p_intf_type
143: and hierarchy is null;
156: if l_hierarchy_tbl(c).hierarchy is null then
157: -- no hierarchy found. Root node
158: l_parent := l_hierarchy_tbl(c).org_name;
159:
160: update JTY_WEBADI_OTH_TERR_INTF
161: set parent_terr_id = l_parent_id
162: , parent_terr_name = l_parent
163: where terr_name = l_hierarchy_tbl(c).terr_name
164: and user_sequence = p_user_sequence
183:
184: case l_count
185: when 0 then
186: -- If this is a new heirarchy, setting its parent to CATCH ALL intially and updating it later to correct parent (populate_parent_id).
187: update JTY_WEBADI_OTH_TERR_INTF
188: set parent_terr_id = 1
189: , parent_terr_name = l_parent
190: where terr_name = l_hierarchy_tbl(c).terr_name
191: and user_sequence = p_user_sequence
202: -- This fix is to avoid error ORA-01436: CONNECT BY loop in user data
203: BEGIN
204: SELECT COUNT(*)
205: INTO l_return_csr
206: FROM JTY_WEBADI_OTH_TERR_INTF j
207: WHERE j.terr_id = l_parent_id -- new parent territory id
208: AND user_sequence = p_user_sequence
209: and interface_type = p_intf_type
210: and action_flag = 'U' -- Update mode
211: CONNECT BY PRIOR j.terr_id = j.parent_terr_id
212: START WITH j.terr_name = l_hierarchy_tbl(c).terr_name; -- territory_id
213:
214: IF (l_return_csr = 0 )THEN
215: update JTY_WEBADI_OTH_TERR_INTF
216: set parent_terr_id = l_parent_id
217: , parent_terr_name = l_parent
218: where terr_name = l_hierarchy_tbl(c).terr_name
219: and user_sequence = p_user_sequence
224: fnd_message.clear;
225: fnd_message.set_name('JTF', 'JTY_OTH_TERR_CIR_REF');
226: x_msg_data := fnd_message.GET();
227:
228: UPDATE jty_webadi_oth_terr_intf
229: SET status = x_return_status,
230: error_msg = x_msg_data
231: WHERE terr_name = l_hierarchy_tbl(c).terr_name
232: AND user_sequence = p_user_sequence
238: fnd_message.clear;
239: fnd_message.set_name('JTF', 'JTY_OTH_TERR_CIR_REF');
240: x_msg_data := fnd_message.GET();
241:
242: UPDATE jty_webadi_oth_terr_intf
243: SET status = x_return_status,
244: error_msg = x_msg_data
245: WHERE terr_name = l_hierarchy_tbl(c).terr_name
246: AND user_sequence = p_user_sequence
253: fnd_message.clear;
254: FND_MESSAGE.set_name ('JTF', 'JTY_OTH_TERR_NON_UNIQUE_TERR');
255: FND_MESSAGE.set_token ('POSITION', l_parent);
256: X_Msg_Data := fnd_message.get();
257: update JTY_WEBADI_OTH_TERR_INTF
258: set status = x_return_status
259: , error_msg = X_Msg_Data
260: where terr_name = l_hierarchy_tbl(c).terr_name
261: and user_sequence = p_user_sequence
276: when 0 then
277: l_parent := substr(l_terr,instr(l_terr,'->',-1)+2);
278: --dbms_output.put_line('case 0, l_parent: '||l_parent);
279: -- If this is a new heirarchy, setting its parent to CATCH ALL intially and updating it later to correct parent (populate_parent_id).
280: update JTY_WEBADI_OTH_TERR_INTF
281: set parent_terr_id = 1
282: , parent_terr_name = l_parent
283: where terr_name = l_hierarchy_tbl(c).terr_name
284: and user_sequence = p_user_sequence
296: FND_MESSAGE.set_name ('JTF', 'JTY_OTH_TERR_NON_UNIQUE_TERR');
297: FND_MESSAGE.set_token ('POSITION', l_parent);
298: X_Msg_Data := fnd_message.get();
299:
300: update JTY_WEBADI_OTH_TERR_INTF
301: set status = x_return_status
302: , error_msg = X_Msg_Data
303: where terr_name = l_hierarchy_tbl(c).terr_name
304: and user_sequence = p_user_sequence
395: fnd_message.clear;
396: fnd_message.set_name('JTF', 'JTY_OTH_TERR_CIR_REF');
397: x_msg_data := fnd_message.GET();
398:
399: UPDATE jty_webadi_oth_terr_intf
400: SET status = x_return_status,
401: error_msg = x_msg_data
402: WHERE terr_name = p_terr_name
403: AND user_sequence = p_user_sequence
409: fnd_message.clear;
410: fnd_message.set_name('JTF', 'JTY_OTH_TERR_CIR_REF');
411: x_msg_data := fnd_message.GET();
412:
413: UPDATE jty_webadi_oth_terr_intf
414: SET status = x_return_status,
415: error_msg = x_msg_data
416: WHERE terr_name = p_terr_name
417: AND user_sequence = p_user_sequence
425: fnd_message.set_name('JTF', 'JTY_OTH_TERR_NON_UNIQUE_TERR');
426: fnd_message.set_token('POSITION', l_parent);
427: x_msg_data := fnd_message.GET();
428:
429: UPDATE jty_webadi_oth_terr_intf
430: SET status = x_return_status,
431: error_msg = x_msg_data
432: WHERE terr_name = p_terr_name
433: AND user_sequence = p_user_sequence
459: ELSIF l_count = 0 THEN
460:
461: SELECT terr_id
462: INTO l_parent_id
463: FROM jty_webadi_oth_terr_intf
464: WHERE org_id = p_org_id
465: AND terr_name = l_parent
466: AND parent_terr_id = l_anc_id;
467:
471: fnd_message.set_name('JTF', 'JTY_OTH_TERR_NON_UNIQUE_TERR');
472: fnd_message.set_token('POSITION', l_parent);
473: x_msg_data := fnd_message.GET();
474:
475: UPDATE jty_webadi_oth_terr_intf
476: SET status = x_return_status,
477: error_msg = x_msg_data
478: WHERE terr_name = p_terr_name
479: AND user_sequence = p_user_sequence
516: from JTY_WEBADI_QUAL_HEADER jqh,
517: (
518: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
519: 1 qual_num
520: FROM JTY_WEBADI_OTH_TERR_INTF jut
521: where jut.USER_SEQUENCE = v_user_sequence
522: and jut.status is null
523: and jut.qual1_value1 is not null
524: and jut.INTERFACE_TYPE = v_intf_type
525: and jut.header = v_header
526: union all
527: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
528: 2 qual_num
529: FROM JTY_WEBADI_OTH_TERR_INTF jut
530: where jut.USER_SEQUENCE = v_user_sequence
531: and jut.status is null
532: and jut.qual2_value1 is not null
533: and jut.INTERFACE_TYPE = v_intf_type
534: and jut.header = v_header
535: union all
536: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
537: 3 qual_num
538: FROM JTY_WEBADI_OTH_TERR_INTF jut
539: where jut.USER_SEQUENCE = v_user_sequence
540: and jut.status is null
541: and jut.qual3_value1 is not null
542: and jut.INTERFACE_TYPE = v_intf_type
543: and jut.header = v_header
544: union all
545: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
546: 4 qual_num
547: FROM JTY_WEBADI_OTH_TERR_INTF jut
548: where jut.USER_SEQUENCE = v_user_sequence
549: and jut.status is null
550: and jut.qual4_value1 is not null
551: and jut.INTERFACE_TYPE = v_intf_type
552: and jut.header = v_header
553: union all
554: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
555: 5 qual_num
556: FROM JTY_WEBADI_OTH_TERR_INTF jut
557: where jut.USER_SEQUENCE = v_user_sequence
558: and jut.status is null
559: and jut.qual5_value1 is not null
560: and jut.INTERFACE_TYPE = v_intf_type
561: and jut.header = v_header
562: union all
563: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
564: 6 qual_num
565: FROM JTY_WEBADI_OTH_TERR_INTF jut
566: where jut.USER_SEQUENCE = v_user_sequence
567: and jut.status is null
568: and jut.qual6_value1 is not null
569: and jut.INTERFACE_TYPE = v_intf_type
570: and jut.header = v_header
571: union all
572: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
573: 7 qual_num
574: FROM JTY_WEBADI_OTH_TERR_INTF jut
575: where jut.USER_SEQUENCE = v_user_sequence
576: and jut.status is null
577: and jut.qual7_value1 is not null
578: and jut.INTERFACE_TYPE = v_intf_type
579: and jut.header = v_header
580: union all
581: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
582: 8 qual_num
583: FROM JTY_WEBADI_OTH_TERR_INTF jut
584: where jut.USER_SEQUENCE = v_user_sequence
585: and jut.status is null
586: and jut.qual8_value1 is not null
587: and jut.INTERFACE_TYPE = v_intf_type
588: and jut.header = v_header
589: union all
590: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
591: 9 qual_num
592: FROM JTY_WEBADI_OTH_TERR_INTF jut
593: where jut.USER_SEQUENCE = v_user_sequence
594: and jut.status is null
595: and jut.qual9_value1 is not null
596: and jut.INTERFACE_TYPE = v_intf_type
597: and jut.header = v_header
598: union all
599: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
600: 10 qual_num
601: FROM JTY_WEBADI_OTH_TERR_INTF jut
602: where jut.USER_SEQUENCE = v_user_sequence
603: and jut.status is null
604: and jut.qual10_value1 is not null
605: and jut.INTERFACE_TYPE = v_intf_type
606: and jut.header = v_header
607: union all
608: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
609: 11 qual_num
610: FROM JTY_WEBADI_OTH_TERR_INTF jut
611: where jut.USER_SEQUENCE = v_user_sequence
612: and jut.status is null
613: and jut.qual11_value1 is not null
614: and jut.INTERFACE_TYPE = v_intf_type
615: and jut.header = v_header
616: union all
617: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
618: 12 qual_num
619: FROM JTY_WEBADI_OTH_TERR_INTF jut
620: where jut.USER_SEQUENCE = v_user_sequence
621: and jut.status is null
622: and jut.qual12_value1 is not null
623: and jut.INTERFACE_TYPE = v_intf_type
624: and jut.header = v_header
625: union all
626: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
627: 13 qual_num
628: FROM JTY_WEBADI_OTH_TERR_INTF jut
629: where jut.USER_SEQUENCE = v_user_sequence
630: and jut.status is null
631: and jut.qual13_value1 is not null
632: and jut.INTERFACE_TYPE = v_intf_type
633: and jut.header = v_header
634: union all
635: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
636: 14 qual_num
637: FROM JTY_WEBADI_OTH_TERR_INTF jut
638: where jut.USER_SEQUENCE = v_user_sequence
639: and jut.status is null
640: and jut.qual14_value1 is not null
641: and jut.INTERFACE_TYPE = v_intf_type
642: and jut.header = v_header
643: union all
644: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
645: 15 qual_num
646: FROM JTY_WEBADI_OTH_TERR_INTF jut
647: where jut.USER_SEQUENCE = v_user_sequence
648: and jut.status is null
649: and jut.qual15_value1 is not null
650: and jut.INTERFACE_TYPE = v_intf_type
651: and jut.header = v_header
652: union all
653: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
654: 16 qual_num
655: FROM JTY_WEBADI_OTH_TERR_INTF jut
656: where jut.USER_SEQUENCE = v_user_sequence
657: and jut.status is null
658: and jut.qual16_value1 is not null
659: and jut.INTERFACE_TYPE = v_intf_type
660: and jut.header = v_header
661: union all
662: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
663: 17 qual_num
664: FROM JTY_WEBADI_OTH_TERR_INTF jut
665: where jut.USER_SEQUENCE = v_user_sequence
666: and jut.status is null
667: and jut.qual17_value1 is not null
668: and jut.INTERFACE_TYPE = v_intf_type
669: and jut.header = v_header
670: union all
671: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
672: 18 qual_num
673: FROM JTY_WEBADI_OTH_TERR_INTF jut
674: where jut.USER_SEQUENCE = v_user_sequence
675: and jut.status is null
676: and jut.qual18_value1 is not null
677: and jut.INTERFACE_TYPE = v_intf_type
678: and jut.header = v_header
679: union all
680: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
681: 19 qual_num
682: FROM JTY_WEBADI_OTH_TERR_INTF jut
683: where jut.USER_SEQUENCE = v_user_sequence
684: and jut.status is null
685: and jut.qual19_value1 is not null
686: and jut.INTERFACE_TYPE = v_intf_type
687: and jut.header = v_header
688: union all
689: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
690: 20 qual_num
691: FROM JTY_WEBADI_OTH_TERR_INTF jut
692: where jut.USER_SEQUENCE = v_user_sequence
693: and jut.status is null
694: and jut.qual20_value1 is not null
695: and jut.INTERFACE_TYPE = v_intf_type
696: and jut.header = v_header
697: union all
698: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
699: 21 qual_num
700: FROM JTY_WEBADI_OTH_TERR_INTF jut
701: where jut.USER_SEQUENCE = v_user_sequence
702: and jut.status is null
703: and jut.qual21_value1 is not null
704: and jut.INTERFACE_TYPE = v_intf_type
705: and jut.header = v_header
706: union all
707: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
708: 22 qual_num
709: FROM JTY_WEBADI_OTH_TERR_INTF jut
710: where jut.USER_SEQUENCE = v_user_sequence
711: and jut.status is null
712: and jut.qual22_value1 is not null
713: and jut.INTERFACE_TYPE = v_intf_type
714: and jut.header = v_header
715: union all
716: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
717: 23 qual_num
718: FROM JTY_WEBADI_OTH_TERR_INTF jut
719: where jut.USER_SEQUENCE = v_user_sequence
720: and jut.status is null
721: and jut.qual23_value1 is not null
722: and jut.INTERFACE_TYPE = v_intf_type
723: and jut.header = v_header
724: union all
725: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
726: 24 qual_num
727: FROM JTY_WEBADI_OTH_TERR_INTF jut
728: where jut.USER_SEQUENCE = v_user_sequence
729: and jut.status is null
730: and jut.qual24_value1 is not null
731: and jut.INTERFACE_TYPE = v_intf_type
732: and jut.header = v_header
733: union all
734: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
735: 25 qual_num
736: FROM JTY_WEBADI_OTH_TERR_INTF jut
737: where jut.USER_SEQUENCE = v_user_sequence
738: and jut.status is null
739: and jut.qual25_value1 is not null
740: and jut.INTERFACE_TYPE = v_intf_type
741: and jut.header = v_header
742: union all
743: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
744: 26 qual_num
745: FROM JTY_WEBADI_OTH_TERR_INTF jut
746: where jut.USER_SEQUENCE = v_user_sequence
747: and jut.status is null
748: and jut.qual26_value1 is not null
749: and jut.INTERFACE_TYPE = v_intf_type
750: and jut.header = v_header
751: union all
752: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
753: 27 qual_num
754: FROM JTY_WEBADI_OTH_TERR_INTF jut
755: where jut.USER_SEQUENCE = v_user_sequence
756: and jut.status is null
757: and jut.qual27_value1 is not null
758: and jut.INTERFACE_TYPE = v_intf_type
759: and jut.header = v_header
760: union all
761: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
762: 28 qual_num
763: FROM JTY_WEBADI_OTH_TERR_INTF jut
764: where jut.USER_SEQUENCE = v_user_sequence
765: and jut.status is null
766: and jut.qual28_value1 is not null
767: and jut.INTERFACE_TYPE = v_intf_type
768: and jut.header = v_header
769: union all
770: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
771: 29 qual_num
772: FROM JTY_WEBADI_OTH_TERR_INTF jut
773: where jut.USER_SEQUENCE = v_user_sequence
774: and jut.status is null
775: and jut.qual29_value1 is not null
776: and jut.INTERFACE_TYPE = v_intf_type
777: and jut.header = v_header
778: union all
779: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
780: 30 qual_num
781: FROM JTY_WEBADI_OTH_TERR_INTF jut
782: where jut.USER_SEQUENCE = v_user_sequence
783: and jut.status is null
784: and jut.qual30_value1 is not null
785: and jut.INTERFACE_TYPE = v_intf_type
786: and jut.header = v_header
787: union all
788: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
789: 31 qual_num
790: FROM JTY_WEBADI_OTH_TERR_INTF jut
791: where jut.USER_SEQUENCE = v_user_sequence
792: and jut.status is null
793: and jut.qual31_value1 is not null
794: and jut.INTERFACE_TYPE = v_intf_type
795: and jut.header = v_header
796: union all
797: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
798: 32 qual_num
799: FROM JTY_WEBADI_OTH_TERR_INTF jut
800: where jut.USER_SEQUENCE = v_user_sequence
801: and jut.status is null
802: and jut.qual32_value1 is not null
803: and jut.INTERFACE_TYPE = v_intf_type
804: and jut.header = v_header
805: union all
806: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
807: 33 qual_num
808: FROM JTY_WEBADI_OTH_TERR_INTF jut
809: where jut.USER_SEQUENCE = v_user_sequence
810: and jut.status is null
811: and jut.qual33_value1 is not null
812: and jut.INTERFACE_TYPE = v_intf_type
813: and jut.header = v_header
814: union all
815: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
816: 34 qual_num
817: FROM JTY_WEBADI_OTH_TERR_INTF jut
818: where jut.USER_SEQUENCE = v_user_sequence
819: and jut.status is null
820: and jut.qual34_value1 is not null
821: and jut.INTERFACE_TYPE = v_intf_type
822: and jut.header = v_header
823: union all
824: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
825: 35 qual_num
826: FROM JTY_WEBADI_OTH_TERR_INTF jut
827: where jut.USER_SEQUENCE = v_user_sequence
828: and jut.status is null
829: and jut.qual35_value1 is not null
830: and jut.INTERFACE_TYPE = v_intf_type
831: and jut.header = v_header
832: union all
833: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
834: 36 qual_num
835: FROM JTY_WEBADI_OTH_TERR_INTF jut
836: where jut.USER_SEQUENCE = v_user_sequence
837: and jut.status is null
838: and jut.qual36_value1 is not null
839: and jut.INTERFACE_TYPE = v_intf_type
840: and jut.header = v_header
841: union all
842: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
843: 37 qual_num
844: FROM JTY_WEBADI_OTH_TERR_INTF jut
845: where jut.USER_SEQUENCE = v_user_sequence
846: and jut.status is null
847: and jut.qual37_value1 is not null
848: and jut.INTERFACE_TYPE = v_intf_type
849: and jut.header = v_header
850: union all
851: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
852: 38 qual_num
853: FROM JTY_WEBADI_OTH_TERR_INTF jut
854: where jut.USER_SEQUENCE = v_user_sequence
855: and jut.status is null
856: and jut.qual38_value1 is not null
857: and jut.INTERFACE_TYPE = v_intf_type
858: and jut.header = v_header
859: union all
860: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
861: 39 qual_num
862: FROM JTY_WEBADI_OTH_TERR_INTF jut
863: where jut.USER_SEQUENCE = v_user_sequence
864: and jut.status is null
865: and jut.qual39_value1 is not null
866: and jut.INTERFACE_TYPE = v_intf_type
867: and jut.header = v_header
868: union all
869: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
870: 40 qual_num
871: FROM JTY_WEBADI_OTH_TERR_INTF jut
872: where jut.USER_SEQUENCE = v_user_sequence
873: and jut.status is null
874: and jut.qual40_value1 is not null
875: and jut.INTERFACE_TYPE = v_intf_type
876: and jut.header = v_header
877: union all
878: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
879: 41 qual_num
880: FROM JTY_WEBADI_OTH_TERR_INTF jut
881: where jut.USER_SEQUENCE = v_user_sequence
882: and jut.status is null
883: and jut.qual41_value1 is not null
884: and jut.INTERFACE_TYPE = v_intf_type
885: and jut.header = v_header
886: union all
887: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
888: 42 qual_num
889: FROM JTY_WEBADI_OTH_TERR_INTF jut
890: where jut.USER_SEQUENCE = v_user_sequence
891: and jut.status is null
892: and jut.qual42_value1 is not null
893: and jut.INTERFACE_TYPE = v_intf_type
894: and jut.header = v_header
895: union all
896: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
897: 43 qual_num
898: FROM JTY_WEBADI_OTH_TERR_INTF jut
899: where jut.USER_SEQUENCE = v_user_sequence
900: and jut.status is null
901: and jut.qual43_value1 is not null
902: and jut.INTERFACE_TYPE = v_intf_type
903: and jut.header = v_header
904: union all
905: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
906: 44 qual_num
907: FROM JTY_WEBADI_OTH_TERR_INTF jut
908: where jut.USER_SEQUENCE = v_user_sequence
909: and jut.status is null
910: and jut.qual44_value1 is not null
911: and jut.INTERFACE_TYPE = v_intf_type
912: and jut.header = v_header
913: union all
914: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
915: 45 qual_num
916: FROM JTY_WEBADI_OTH_TERR_INTF jut
917: where jut.USER_SEQUENCE = v_user_sequence
918: and jut.status is null
919: and jut.qual45_value1 is not null
920: and jut.INTERFACE_TYPE = v_intf_type
921: and jut.header = v_header
922: union all
923: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
924: 46 qual_num
925: FROM JTY_WEBADI_OTH_TERR_INTF jut
926: where jut.USER_SEQUENCE = v_user_sequence
927: and jut.status is null
928: and jut.qual46_value1 is not null
929: and jut.INTERFACE_TYPE = v_intf_type
930: and jut.header = v_header
931: union all
932: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
933: 47 qual_num
934: FROM JTY_WEBADI_OTH_TERR_INTF jut
935: where jut.USER_SEQUENCE = v_user_sequence
936: and jut.status is null
937: and jut.qual47_value1 is not null
938: and jut.INTERFACE_TYPE = v_intf_type
939: and jut.header = v_header
940: union all
941: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
942: 48 qual_num
943: FROM JTY_WEBADI_OTH_TERR_INTF jut
944: where jut.USER_SEQUENCE = v_user_sequence
945: and jut.status is null
946: and jut.qual48_value1 is not null
947: and jut.INTERFACE_TYPE = v_intf_type
948: and jut.header = v_header
949: union all
950: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
951: 49 qual_num
952: FROM JTY_WEBADI_OTH_TERR_INTF jut
953: where jut.USER_SEQUENCE = v_user_sequence
954: and jut.status is null
955: and jut.qual49_value1 is not null
956: and jut.INTERFACE_TYPE = v_intf_type
957: and jut.header = v_header
958: union all
959: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
960: 50 qual_num
961: FROM JTY_WEBADI_OTH_TERR_INTF jut
962: where jut.USER_SEQUENCE = v_user_sequence
963: and jut.status is null
964: and jut.qual50_value1 is not null
965: and jut.INTERFACE_TYPE = v_intf_type
966: and jut.header = v_header
967: union all
968: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
969: 51 qual_num
970: FROM JTY_WEBADI_OTH_TERR_INTF jut
971: where jut.USER_SEQUENCE = v_user_sequence
972: and jut.status is null
973: and jut.qual51_value1 is not null
974: and jut.INTERFACE_TYPE = v_intf_type
975: and jut.header = v_header
976: union all
977: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
978: 52 qual_num
979: FROM JTY_WEBADI_OTH_TERR_INTF jut
980: where jut.USER_SEQUENCE = v_user_sequence
981: and jut.status is null
982: and jut.qual52_value1 is not null
983: and jut.INTERFACE_TYPE = v_intf_type
984: and jut.header = v_header
985: union all
986: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
987: 53 qual_num
988: FROM JTY_WEBADI_OTH_TERR_INTF jut
989: where jut.USER_SEQUENCE = v_user_sequence
990: and jut.status is null
991: and jut.qual53_value1 is not null
992: and jut.INTERFACE_TYPE = v_intf_type
993: and jut.header = v_header
994: union all
995: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
996: 54 qual_num
997: FROM JTY_WEBADI_OTH_TERR_INTF jut
998: where jut.USER_SEQUENCE = v_user_sequence
999: and jut.status is null
1000: and jut.qual54_value1 is not null
1001: and jut.INTERFACE_TYPE = v_intf_type
1002: and jut.header = v_header
1003: union all
1004: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
1005: 55 qual_num
1006: FROM JTY_WEBADI_OTH_TERR_INTF jut
1007: where jut.USER_SEQUENCE = v_user_sequence
1008: and jut.status is null
1009: and jut.qual55_value1 is not null
1010: and jut.INTERFACE_TYPE = v_intf_type
1011: and jut.header = v_header
1012: union all
1013: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
1014: 56 qual_num
1015: FROM JTY_WEBADI_OTH_TERR_INTF jut
1016: where jut.USER_SEQUENCE = v_user_sequence
1017: and jut.status is null
1018: and jut.qual56_value1 is not null
1019: and jut.INTERFACE_TYPE = v_intf_type
1020: and jut.header = v_header
1021: union all
1022: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
1023: 57 qual_num
1024: FROM JTY_WEBADI_OTH_TERR_INTF jut
1025: where jut.USER_SEQUENCE = v_user_sequence
1026: and jut.status is null
1027: and jut.qual57_value1 is not null
1028: and jut.INTERFACE_TYPE = v_intf_type
1029: and jut.header = v_header
1030: union all
1031: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
1032: 58 qual_num
1033: FROM JTY_WEBADI_OTH_TERR_INTF jut
1034: where jut.USER_SEQUENCE = v_user_sequence
1035: and jut.status is null
1036: and jut.qual58_value1 is not null
1037: and jut.INTERFACE_TYPE = v_intf_type
1038: and jut.header = v_header
1039: union all
1040: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
1041: 59 qual_num
1042: FROM JTY_WEBADI_OTH_TERR_INTF jut
1043: where jut.USER_SEQUENCE = v_user_sequence
1044: and jut.status is null
1045: and jut.qual59_value1 is not null
1046: and jut.INTERFACE_TYPE = v_intf_type
1047: and jut.header = v_header
1048: union all
1049: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
1050: 60 qual_num
1051: FROM JTY_WEBADI_OTH_TERR_INTF jut
1052: where jut.USER_SEQUENCE = v_user_sequence
1053: and jut.status is null
1054: and jut.qual60_value1 is not null
1055: and jut.INTERFACE_TYPE = v_intf_type
1056: and jut.header = v_header
1057: union all
1058: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
1059: 61 qual_num
1060: FROM JTY_WEBADI_OTH_TERR_INTF jut
1061: where jut.USER_SEQUENCE = v_user_sequence
1062: and jut.status is null
1063: and jut.qual61_value1 is not null
1064: and jut.INTERFACE_TYPE = v_intf_type
1065: and jut.header = v_header
1066: union all
1067: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
1068: 62 qual_num
1069: FROM JTY_WEBADI_OTH_TERR_INTF jut
1070: where jut.USER_SEQUENCE = v_user_sequence
1071: and jut.status is null
1072: and jut.qual62_value1 is not null
1073: and jut.INTERFACE_TYPE = v_intf_type
1074: and jut.header = v_header
1075: union all
1076: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
1077: 63 qual_num
1078: FROM JTY_WEBADI_OTH_TERR_INTF jut
1079: where jut.USER_SEQUENCE = v_user_sequence
1080: and jut.status is null
1081: and jut.qual63_value1 is not null
1082: and jut.INTERFACE_TYPE = v_intf_type
1083: and jut.header = v_header
1084: union all
1085: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
1086: 64 qual_num
1087: FROM JTY_WEBADI_OTH_TERR_INTF jut
1088: where jut.USER_SEQUENCE = v_user_sequence
1089: and jut.status is null
1090: and jut.qual64_value1 is not null
1091: and jut.INTERFACE_TYPE = v_intf_type
1092: and jut.header = v_header
1093: union all
1094: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
1095: 65 qual_num
1096: FROM JTY_WEBADI_OTH_TERR_INTF jut
1097: where jut.USER_SEQUENCE = v_user_sequence
1098: and jut.status is null
1099: and jut.qual65_value1 is not null
1100: and jut.INTERFACE_TYPE = v_intf_type
1101: and jut.header = v_header
1102: union all
1103: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
1104: 66 qual_num
1105: FROM JTY_WEBADI_OTH_TERR_INTF jut
1106: where jut.USER_SEQUENCE = v_user_sequence
1107: and jut.status is null
1108: and jut.qual46_value1 is not null
1109: and jut.INTERFACE_TYPE = v_intf_type
1110: and jut.header = v_header
1111: union all
1112: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
1113: 67 qual_num
1114: FROM JTY_WEBADI_OTH_TERR_INTF jut
1115: where jut.USER_SEQUENCE = v_user_sequence
1116: and jut.status is null
1117: and jut.qual67_value1 is not null
1118: and jut.INTERFACE_TYPE = v_intf_type
1119: and jut.header = v_header
1120: union all
1121: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
1122: 68 qual_num
1123: FROM JTY_WEBADI_OTH_TERR_INTF jut
1124: where jut.USER_SEQUENCE = v_user_sequence
1125: and jut.status is null
1126: and jut.qual68_value1 is not null
1127: and jut.INTERFACE_TYPE = v_intf_type
1128: and jut.header = v_header
1129: union all
1130: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
1131: 69 qual_num
1132: FROM JTY_WEBADI_OTH_TERR_INTF jut
1133: where jut.USER_SEQUENCE = v_user_sequence
1134: and jut.status is null
1135: and jut.qual69_value1 is not null
1136: and jut.INTERFACE_TYPE = v_intf_type
1137: and jut.header = v_header
1138: union all
1139: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
1140: 70 qual_num
1141: FROM JTY_WEBADI_OTH_TERR_INTF jut
1142: where jut.USER_SEQUENCE = v_user_sequence
1143: and jut.status is null
1144: and jut.qual70_value1 is not null
1145: and jut.INTERFACE_TYPE = v_intf_type
1146: and jut.header = v_header
1147: union all
1148: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
1149: 71 qual_num
1150: FROM JTY_WEBADI_OTH_TERR_INTF jut
1151: where jut.USER_SEQUENCE = v_user_sequence
1152: and jut.status is null
1153: and jut.qual71_value1 is not null
1154: and jut.INTERFACE_TYPE = v_intf_type
1155: and jut.header = v_header
1156: union all
1157: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
1158: 72 qual_num
1159: FROM JTY_WEBADI_OTH_TERR_INTF jut
1160: where jut.USER_SEQUENCE = v_user_sequence
1161: and jut.status is null
1162: and jut.qual72_value1 is not null
1163: and jut.INTERFACE_TYPE = v_intf_type
1164: and jut.header = v_header
1165: union all
1166: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
1167: 73 qual_num
1168: FROM JTY_WEBADI_OTH_TERR_INTF jut
1169: where jut.USER_SEQUENCE = v_user_sequence
1170: and jut.status is null
1171: and jut.qual73_value1 is not null
1172: and jut.INTERFACE_TYPE = v_intf_type
1173: and jut.header = v_header
1174: union all
1175: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
1176: 74 qual_num
1177: FROM JTY_WEBADI_OTH_TERR_INTF jut
1178: where jut.USER_SEQUENCE = v_user_sequence
1179: and jut.status is null
1180: and jut.qual74_value1 is not null
1181: and jut.INTERFACE_TYPE = v_intf_type
1182: and jut.header = v_header
1183: union all
1184: select jut.lay_seq_num, jut.user_sequence, jut.terr_type_id,
1185: 75 qual_num
1186: FROM JTY_WEBADI_OTH_TERR_INTF jut
1187: where jut.USER_SEQUENCE = v_user_sequence
1188: and jut.status is null
1189: and jut.qual75_value1 is not null
1190: and jut.INTERFACE_TYPE = v_intf_type
1207: fnd_message.clear;
1208: fnd_message.set_name ('JTF', 'JTF_TTY_INVALID_TERR_NAME');
1209: X_Msg_Data := fnd_message.get();
1210: debugmsg('VALIDATE_TERRITORY_RECORDS: Validate JTF_TTY_INVALID_TERR_NAME : ' );
1211: update JTY_WEBADI_OTH_TERR_INTF jwot
1212: set status = x_return_status,
1213: error_msg = X_Msg_Data
1214: where jwot.terr_name is null
1215: and jwot.USER_SEQUENCE = p_USER_SEQUENCE
1221: fnd_message.clear;
1222: fnd_message.set_name ('JTF', 'JTY_OTH_TERR_INVALID_RANK');
1223: X_Msg_Data := fnd_message.get();
1224:
1225: update JTY_WEBADI_OTH_TERR_INTF jwot
1226: set status = x_return_status,
1227: error_msg = X_Msg_Data
1228: where jwot.rank is null
1229: and jwot.header = 'TERR'
1236: fnd_message.clear;
1237: fnd_message.set_name ('JTF', 'JTY_OTH_TERR_INVALID_ORGID');
1238: X_Msg_Data := fnd_message.get();
1239:
1240: update JTY_WEBADI_OTH_TERR_INTF jwot
1241: set status = x_return_status,
1242: error_msg = X_Msg_Data
1243: where jwot.org_id is null
1244: and jwot.header = 'TERR'
1253: fnd_message.clear;
1254: fnd_message.set_name ('JTF', 'JTY_OTH_TERR_INVALID_ID');
1255: X_Msg_Data := fnd_message.get();
1256: debugmsg('VALIDATE_TERRITORY_RECORDS: Validate JTY_OTH_TERR_INVALID_ID : ' );
1257: update JTY_WEBADI_OTH_TERR_INTF jwot
1258: set status = x_return_status,
1259: error_msg = X_Msg_Data
1260: where ( (jwot.TERR_ID IS NULL and jwot.header = 'TERR')
1261: OR (jwot.header = 'QUAL' and jwot.TERR_QUAL_ID1 IS NULL
1313: fnd_message.clear;
1314: fnd_message.set_name ('JTF', 'JTY_OTH_TERR_INVALID_TEMPLATE');
1315: X_Msg_Data := fnd_message.get();
1316: debugmsg('VALIDATE_TERRITORY_RECORDS: Validate JTY_OTH_TERR_INVALID_TEMPLATE : ' );
1317: update JTY_WEBADI_OTH_TERR_INTF jwot
1318: set jwot.status = x_return_status,
1319: jwot.error_msg = X_Msg_Data
1320: where not exists ( SELECT 1
1321: FROM jtf_terr_all jt
1334: fnd_message.clear;
1335: fnd_message.set_name ('JTF', 'JTY_OTH_TERR_NO_TEMPLATE');
1336: X_Msg_Data := fnd_message.get();
1337: debugmsg('VALIDATE_TERRITORY_RECORDS: Validate JTY_OTH_TERR_NO_TEMPLATE : ' );
1338: update JTY_WEBADI_OTH_TERR_INTF jwot
1339: set status = x_return_status,
1340: error_msg = X_Msg_Data
1341: where jwot.TERR_TYPE_ID is null
1342: AND jwot.user_sequence = p_user_sequence
1350: fnd_message.clear;
1351: fnd_message.set_name ('JTF', 'JTY_OTH_TERR_INVALID_ACCESS');
1352: X_Msg_Data := fnd_message.get();
1353: debugmsg('VALIDATE_TERRITORY_RECORDS: Validate JTY_OTH_TERR_INVALID_ACCESS : ' );
1354: update JTY_WEBADI_OTH_TERR_INTF jwot
1355: set jwot.status = x_return_status,
1356: jwot.error_msg = X_Msg_Data
1357: where exists
1358: (select 1 from JTY_WEBADI_RESOURCES jwr
1404: fnd_message.clear;
1405: fnd_message.set_name ('JTF', 'JTY_OTH_TERR_INVALID_ACCESS');
1406: X_Msg_Data := fnd_message.get();
1407: debugmsg('VALIDATE_TERRITORY_RECORDS: Validate JTY_OTH_TERR_INVALID_ACCESS : ' );
1408: update JTY_WEBADI_OTH_TERR_INTF jwot
1409: set jwot.status = x_return_status,
1410: jwot.error_msg = X_Msg_Data
1411: where exists
1412: (select 1 from JTY_WEBADI_RESOURCES jwr
1437: fnd_message.clear;
1438: fnd_message.set_name ('JTF', 'JTF_TTY_DUPLICATE_RESOURCE');
1439: X_Msg_Data := fnd_message.get();
1440: debugmsg('VALIDATE_TERRITORY_RECORDS: Validate JTF_TTY_DUPLICATE_RESOURCE : ' );
1441: update JTY_WEBADI_OTH_TERR_INTF jwot
1442: set status = x_return_status
1443: , error_msg = X_Msg_Data
1444: where jwot.USER_SEQUENCE = p_USER_SEQUENCE
1445: and jwot.INTERFACE_TYPE = p_intf_type
1462: );
1463: -- Fix for bug # 6372728 END
1464:
1465: -- Fix for bug # 9124144 START
1466: update JTY_WEBADI_OTH_TERR_INTF jwot
1467: set status = x_return_status
1468: , error_msg = X_Msg_Data
1469: where jwot.USER_SEQUENCE = p_USER_SEQUENCE
1470: and jwot.INTERFACE_TYPE = p_intf_type
1492: fnd_message.clear;
1493: fnd_message.set_name ('JTF', 'JTY_OTH_TERR_RSC_START_DATE');
1494: X_Msg_Data := fnd_message.get();
1495: debugmsg('VALIDATE_TERRITORY_RECORDS: Validate JTY_OTH_TERR_RSC_START_DATE : ' );
1496: UPDATE JTY_WEBADI_OTH_TERR_INTF jwot
1497: set jwot.status = x_return_status,
1498: jwot.error_msg = X_Msg_Data
1499: where exists
1500: (select 1 from JTY_WEBADI_RESOURCES jwr
1514: fnd_message.clear;
1515: fnd_message.set_name ('JTF', 'JTY_OTH_TERR_RSC_END_DATE');
1516: X_Msg_Data := fnd_message.get();
1517: debugmsg('VALIDATE_TERRITORY_RECORDS: Validate JTY_OTH_TERR_RSC_END_DATE : ' );
1518: UPDATE JTY_WEBADI_OTH_TERR_INTF jwot
1519: set jwot.status = x_return_status,
1520: jwot.error_msg = X_Msg_Data
1521: where exists
1522: (select 1 from JTY_WEBADI_RESOURCES jwr
1544: close get_qual_csr;
1545: debugmsg('VALIDATE_TERRITORY_RECORDS: Validate qual_rec.lay_seq_num.count : ' || qual_rec.lay_seq_num.count );
1546: if qual_rec.lay_seq_num.count > 0 then
1547: forall i in qual_rec.lay_seq_num.first..qual_rec.lay_seq_num.last
1548: update JTY_WEBADI_OTH_TERR_INTF jwot
1549: set jwot.status = x_return_status,
1550: jwot.error_msg = decode(jwot.error_msg,null,X_Msg_Data||': '||qual_rec.qualifier_name(i),
1551: jwot.error_msg ||', ' || qual_rec.qualifier_name(i))
1552: where jwot.lay_seq_num = qual_rec.lay_seq_num(i)
1561: fnd_message.clear;
1562: fnd_message.set_name ('JTF', 'JTY_OTH_TERR_START_DATE');
1563: X_Msg_Data := fnd_message.get();
1564: debugmsg('VALIDATE_TERRITORY_RECORDS: Validate JTY_OTH_TERR_START_DATE : ' );
1565: UPDATE JTY_WEBADI_OTH_TERR_INTF jwot
1566: set status = x_return_status,
1567: error_msg = X_Msg_Data
1568: where jwot.interface_type = p_intf_type
1569: AND jwot.HEADER= l_header
1571: AND jwot.hierarchy is not null
1572: and jwot.TERR_START_DATE is not null
1573: and jwot.status is null
1574: and ( exists ( select 1
1575: from JTY_WEBADI_OTH_TERR_INTF jwot2
1576: where jwot.parent_terr_id is null
1577: and NOT(jwot.TERR_START_DATE between NVL(jwot2.terr_start_date,SYSDATE)
1578: and NVL(jwot2.TERR_END_DATE, ADD_MONTHS(NVL(jwot2.TERR_START_DATE,SYSDATE), 12)))
1579: and jwot.parent_terr_name = jwot2.terr_name)
1587: fnd_message.clear;
1588: fnd_message.set_name ('JTF', 'JTY_OTH_TERR_END_DATE');
1589: X_Msg_Data := fnd_message.get();
1590: debugmsg('VALIDATE_TERRITORY_RECORDS: Validate JTY_OTH_TERR_END_DATE : ' );
1591: UPDATE JTY_WEBADI_OTH_TERR_INTF jwot
1592: set status = x_return_status,
1593: error_msg = X_Msg_Data
1594: where jwot.interface_type = p_intf_type
1595: AND jwot.HEADER= l_header
1597: AND jwot.hierarchy is not null
1598: AND jwot.TERR_END_DATE is not null
1599: and jwot.status is null
1600: and (exists ( select 1
1601: from JTY_WEBADI_OTH_TERR_INTF jwot2
1602: where jwot.parent_terr_id is null
1603: and NOT (jwot.TERR_END_DATE between NVL(jwot2.terr_start_date,SYSDATE)
1604: and NVL(jwot2.TERR_END_DATE, ADD_MONTHS(NVL(jwot2.TERR_START_DATE,SYSDATE), 12)))
1605: and jwot.parent_terr_name = jwot2.terr_name)
1618: fnd_message.set_name ('JTF', 'JTY_TTY_DUPLICATE_TERR');
1619: X_Msg_Data := fnd_message.get();
1620: debugmsg('VALIDATE_TERRITORY_RECORDS: Validate JTY_TTY_DUPLICATE_TERR : ' );
1621:
1622: update JTY_WEBADI_OTH_TERR_INTF jwot
1623: set status = x_return_status
1624: , error_msg = X_Msg_Data
1625: where jwot.header = 'TERR'
1626: and jwot.action_flag='C'
1635: );
1636:
1637: -- The above fix checks for duplicate territory name only while creating a new territory.
1638: -- The following fix checks for the duplicate territory name while updating a territory. Fix for bug: 8289489.
1639: update JTY_WEBADI_OTH_TERR_INTF jwot
1640: set status = x_return_status
1641: , error_msg = X_Msg_Data
1642: where jwot.header = 'TERR'
1643: and jwot.action_flag='U'
1662: fnd_message.clear;
1663: fnd_message.set_name ('JTF', 'JTY_TERR_OTH_MTERR_DFF_NA');
1664: X_Msg_Data := fnd_message.get();
1665: debugmsg('VALIDATE_TERRITORY_RECORDS: Validate JTY_TERR_OTH_MTERR_DFF_NA : ' );
1666: update JTY_WEBADI_OTH_TERR_INTF jwot
1667: set status = x_return_status
1668: , error_msg = X_Msg_Data
1669: where jwot.header = 'TERR'
1670: and jwot.action_flag IN ('C', 'U')
1680: fnd_message.clear;
1681: fnd_message.set_name ('JTF', 'JTY_OTH_TERR_NO_ACCESS');
1682: X_Msg_Data := fnd_message.get();
1683: debugmsg('VALIDATE_TERRITORY_RECORDS: Validate JTY_OTH_TERR_NO_ACCESS : ' );
1684: update JTY_WEBADI_OTH_TERR_INTF jwot
1685: set status = x_return_status,
1686: error_msg = X_Msg_Data
1687: where (jwot.org_id is null
1688: or mo_global.check_access(jwot.org_id) <> 'Y')
1689: and jwot.USER_SEQUENCE = p_USER_SEQUENCE
1690: and jwot.INTERFACE_TYPE = p_intf_type
1691: and jwot.status is null;
1692:
1693: UPDATE JTY_WEBADI_OTH_TERR_INTF jwot
1694: set (status,error_msg) = (SELECT jwot2.STATUS, jwot2.error_msg
1695: FROM JTY_WEBADI_OTH_TERR_INTF jwot2
1696: where jwot.terr_name = jwot2.terr_name
1697: and jwot2.header = l_header
1691: and jwot.status is null;
1692:
1693: UPDATE JTY_WEBADI_OTH_TERR_INTF jwot
1694: set (status,error_msg) = (SELECT jwot2.STATUS, jwot2.error_msg
1695: FROM JTY_WEBADI_OTH_TERR_INTF jwot2
1696: where jwot.terr_name = jwot2.terr_name
1697: and jwot2.header = l_header
1698: and jwot.USER_SEQUENCE = jwot2.USER_SEQUENCE
1699: and jwot.INTERFACE_TYPE = jwot2.INTERFACE_TYPE)
1706: --Here Account classification and Oppurtunity classification qualifiers validation has been done.
1707:
1708: x_return_status := FND_API.G_RET_STS_ERROR;
1709: fnd_message.clear;
1710: update JTY_WEBADI_OTH_TERR_INTF jwot
1711: set status = x_return_status,
1712: error_msg = 'Primary Interest and Secondary Interest values are mandatory. Please enter values for Primary and Secondary Interest'
1713: where ((jwot.QUAL1_VALUE1 is not null AND (jwot.QUAL1_VALUE2 is null OR jwot.QUAL1_VALUE3 is null))
1714: OR (jwot.QUAL2_VALUE1 is not null AND (jwot.QUAL2_VALUE2 is null OR jwot.QUAL2_VALUE3 is null)))
1720:
1721: x_return_status := FND_API.G_RET_STS_SUCCESS;
1722: debugmsg('VALIDATE_TERRITORY_RECORDS: Validate x_return_status : ' || x_return_status);
1723: select count(*) into l_count
1724: from JTY_WEBADI_OTH_TERR_INTF jwot
1725: where status is not null
1726: and jwot.USER_SEQUENCE = p_USER_SEQUENCE
1727: and jwot.INTERFACE_TYPE = p_intf_type;
1728:
1728:
1729: --dbms_output.put_line ('l_count: '||l_count);
1730: debugmsg('VALIDATE_TERRITORY_RECORDS: Validate l_count : ' || l_count);
1731: if l_count > 0 then
1732: UPDATE JTY_WEBADI_OTH_TERR_INTF jwot
1733: set status = x_return_status
1734: where status is null
1735: and jwot.USER_SEQUENCE = p_USER_SEQUENCE
1736: and jwot.INTERFACE_TYPE = p_intf_type;
1758: l_login_id := fnd_global.login_id;
1759: l_intf_type := p_intf_type;
1760:
1761:
1762: update JTY_WEBADI_OTH_TERR_INTF jwot
1763: set LAST_UPDATE_LOGIN = l_login_id,
1764: (terr_start_date,TERR_END_DATE) =
1765: (SELECT NVL(jwot.TERR_START_DATE,TRUNC(SYSDATE)),
1766: NVL(jwot.TERR_END_DATE, ADD_MONTHS(NVL(jwot.TERR_START_DATE,TRUNC(SYSDATE)), 12) )
1763: set LAST_UPDATE_LOGIN = l_login_id,
1764: (terr_start_date,TERR_END_DATE) =
1765: (SELECT NVL(jwot.TERR_START_DATE,TRUNC(SYSDATE)),
1766: NVL(jwot.TERR_END_DATE, ADD_MONTHS(NVL(jwot.TERR_START_DATE,TRUNC(SYSDATE)), 12) )
1767: FROM JTY_WEBADI_OTH_TERR_INTF jwot2
1768: WHERE jwot.terr_id = jwot2.terr_id
1769: and jwot.user_sequence = jwot2.user_sequence
1770: and jwot2.header = 'TERR'
1771: and rownum = 1),
1769: and jwot.user_sequence = jwot2.user_sequence
1770: and jwot2.header = 'TERR'
1771: and rownum = 1),
1772: usage_id = (select jwot2.usage_id from
1773: JTY_WEBADI_OTH_TERR_INTF jwot2
1774: where jwot.user_sequence = jwot2.user_sequence
1775: and interface_type = 'D'
1776: and jwot2.usage_id is not null
1777: and rownum = 1)
1779: and jwot.interface_type = l_intf_type
1780: and jwot.action_flag = l_action_flag
1781: and jwot.status is null;
1782:
1783: UPDATE JTY_WEBADI_OTH_TERR_INTF jwot
1784: SET (TERR_ID, TERR_START_DATE, TERR_END_DATE) =
1785: (select jta.terr_id, NVL(jwot.TERR_START_DATE,jta.START_DATE_ACTIVE)
1786: , NVL(jwot.TERR_END_DATE,jta.END_DATE_ACTIVE)
1787: from jtf_terr_all jta
1797: --and jta.parent_territory_id = jwot.parent_terr_id
1798: ) ;
1799:
1800: --dbms_output.put_line(' # records processed for intf table: '||SQL%ROWCOUNT);
1801: update JTY_WEBADI_OTH_TERR_INTF
1802: set QUAL1_VALUE_ID = NULL, QUAL2_VALUE_ID = NULL
1803: , QUAL3_VALUE_ID = NULL, QUAL4_VALUE_ID = NULL
1804: , QUAL5_VALUE_ID = NULL, QUAL6_VALUE_ID = NULL
1805: , QUAL7_VALUE_ID = NULL, QUAL8_VALUE_ID = NULL
1842: and user_sequence = p_user_sequence
1843: and action_flag = l_action_flag
1844: and header = 'QUAL';
1845:
1846: UPDATE JTY_WEBADI_OTH_TERR_INTF jwot
1847: set jwot.terr_id = null
1848: where jwot.status is null
1849: and jwot.interface_type = l_intf_type
1850: and jwot.user_sequence = p_user_sequence
1848: where jwot.status is null
1849: and jwot.interface_type = l_intf_type
1850: and jwot.user_sequence = p_user_sequence
1851: and jwot.action_flag = l_action_flag
1852: and exists (select 1 from JTY_WEBADI_OTH_TERR_INTF jwot2
1853: where jwot.terr_id = jwot2.terr_id
1854: and jwot.action_flag = jwot2.action_flag
1855: and jwot.user_sequence = jwot2.user_sequence
1856: and jwot.interface_type = jwot2.interface_type
1857: and jwot2.header = 'TERR');
1858:
1859: UPDATE JTY_WEBADI_RESOURCES jwr
1860: SET TERR_ID = (select jwot.terr_id
1861: from JTY_WEBADI_OTH_TERR_INTF jwot
1862: where jwr.lay_seq_num = jwot.lay_seq_num
1863: and rownum = 1) ,
1864: TERR_RSC_ID = NULL,
1865: TERR_RSC_ACCESS_ID1 = NULL, TERR_RSC_ACCESS_ID2 = NULL,
1867: TERR_RSC_ACCESS_ID5 = NULL, TERR_RSC_ACCESS_ID6 = NULL,
1868: TERR_RSC_ACCESS_ID7 = NULL, TERR_RSC_ACCESS_ID8 = NULL,
1869: TERR_RSC_ACCESS_ID9 = NULL, TERR_RSC_ACCESS_ID10 = NULL
1870: where exists
1871: ( select 1 from JTY_WEBADI_OTH_TERR_INTF jwot
1872: where jwot.interface_type = l_intf_type
1873: and jwot.user_sequence = p_user_sequence
1874: and jwot.status is null
1875: and jwot.action_flag = l_action_flag
1891: v_intf_type varchar2,
1892: v_qual_num number
1893: ) IS
1894: select jtq.terr_qual_id, jwot.lay_seq_num
1895: from JTY_WEBADI_QUAL_HEADER qgt , jtf_terr_qual_all jtq, JTY_WEBADI_OTH_TERR_INTF jwot
1896: WHERE qgt.qual_usg_id = jtq.qual_usg_id
1897: and jtq.org_id = jwot.org_id
1898: AND qgt.user_sequence = jwot.user_sequence
1899: AND jtq.terr_id = jwot.terr_id
1923: --dbms_output.put_line ('i: '||i);
1924: case i
1925: when 1 then
1926: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
1927: update JTY_WEBADI_OTH_TERR_INTF jwot
1928: set jwot.terr_qual_id1 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
1929: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
1930: and jwot.header = p_header
1931: and jwot.user_sequence = p_user_sequence
1933: and jwot.status is null;
1934: --dbms_output.put_line('1 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
1935: when 2 then
1936: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
1937: update JTY_WEBADI_OTH_TERR_INTF jwot
1938: set jwot.terr_qual_id2 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
1939: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
1940: and jwot.header = p_header
1941: and jwot.user_sequence = p_user_sequence
1943: and jwot.status is null;
1944: --dbms_output.put_line('2 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
1945: when 3 then
1946: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
1947: update JTY_WEBADI_OTH_TERR_INTF jwot
1948: set jwot.terr_qual_id3 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
1949: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
1950: and jwot.header = p_header
1951: and jwot.user_sequence = p_user_sequence
1953: and jwot.status is null;
1954: --dbms_output.put_line('3 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
1955: when 4 then
1956: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
1957: update JTY_WEBADI_OTH_TERR_INTF jwot
1958: set jwot.terr_qual_id4 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
1959: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
1960: and jwot.header = p_header
1961: and jwot.user_sequence = p_user_sequence
1963: and jwot.status is null;
1964: --dbms_output.put_line('4 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
1965: when 5 then
1966: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
1967: update JTY_WEBADI_OTH_TERR_INTF jwot
1968: set jwot.terr_qual_id5 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
1969: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
1970: and jwot.header = p_header
1971: and jwot.user_sequence = p_user_sequence
1973: and jwot.status is null;
1974: --dbms_output.put_line('5 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
1975: when 6 then
1976: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
1977: update JTY_WEBADI_OTH_TERR_INTF jwot
1978: set jwot.terr_qual_id6 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
1979: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
1980: and jwot.header = p_header
1981: and jwot.user_sequence = p_user_sequence
1983: and jwot.status is null;
1984: --dbms_output.put_line('6 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
1985: when 7 then
1986: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
1987: update JTY_WEBADI_OTH_TERR_INTF jwot
1988: set jwot.terr_qual_id7 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
1989: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
1990: and jwot.header = p_header
1991: and jwot.user_sequence = p_user_sequence
1993: and jwot.status is null;
1994: --dbms_output.put_line('7 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
1995: when 8 then
1996: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
1997: update JTY_WEBADI_OTH_TERR_INTF jwot
1998: set jwot.terr_qual_id8 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
1999: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2000: and jwot.header = p_header
2001: and jwot.user_sequence = p_user_sequence
2003: and jwot.status is null;
2004: --dbms_output.put_line('8 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2005: when 9 then
2006: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2007: update JTY_WEBADI_OTH_TERR_INTF jwot
2008: set jwot.terr_qual_id9 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2009: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2010: and jwot.header = p_header
2011: and jwot.user_sequence = p_user_sequence
2013: and jwot.status is null;
2014: --dbms_output.put_line('9 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2015: when 10 then
2016: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2017: update JTY_WEBADI_OTH_TERR_INTF jwot
2018: set jwot.terr_qual_id10 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2019: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2020: and jwot.header = p_header
2021: and jwot.user_sequence = p_user_sequence
2023: and jwot.status is null;
2024: --dbms_output.put_line('10 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2025: when 11 then
2026: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2027: update JTY_WEBADI_OTH_TERR_INTF jwot
2028: set jwot.terr_qual_id11 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2029: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2030: and jwot.header = p_header
2031: and jwot.user_sequence = p_user_sequence
2033: and jwot.status is null;
2034: --dbms_output.put_line('11 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2035: when 12 then
2036: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2037: update JTY_WEBADI_OTH_TERR_INTF jwot
2038: set jwot.terr_qual_id12 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2039: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2040: and jwot.header = p_header
2041: and jwot.user_sequence = p_user_sequence
2043: and jwot.status is null;
2044: --dbms_output.put_line('12 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2045: when 13 then
2046: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2047: update JTY_WEBADI_OTH_TERR_INTF jwot
2048: set jwot.terr_qual_id13 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2049: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2050: and jwot.header = p_header
2051: and jwot.user_sequence = p_user_sequence
2053: and jwot.status is null;
2054: --dbms_output.put_line('13 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2055: when 14 then
2056: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2057: update JTY_WEBADI_OTH_TERR_INTF jwot
2058: set jwot.terr_qual_id14 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2059: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2060: and jwot.header = p_header
2061: and jwot.user_sequence = p_user_sequence
2063: and jwot.status is null;
2064: --dbms_output.put_line('14 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2065: when 15 then
2066: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2067: update JTY_WEBADI_OTH_TERR_INTF jwot
2068: set jwot.terr_qual_id15 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2069: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2070: and jwot.header = p_header
2071: and jwot.user_sequence = p_user_sequence
2073: and jwot.status is null;
2074: --dbms_output.put_line('15 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2075: when 16 then
2076: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2077: update JTY_WEBADI_OTH_TERR_INTF jwot
2078: set jwot.terr_qual_id16 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2079: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2080: and jwot.header = p_header
2081: and jwot.user_sequence = p_user_sequence
2083: and jwot.status is null;
2084: --dbms_output.put_line('16 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2085: when 17 then
2086: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2087: update JTY_WEBADI_OTH_TERR_INTF jwot
2088: set jwot.terr_qual_id17 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2089: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2090: and jwot.header = p_header
2091: and jwot.user_sequence = p_user_sequence
2093: and jwot.status is null;
2094: --dbms_output.put_line('17 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2095: when 18 then
2096: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2097: update JTY_WEBADI_OTH_TERR_INTF jwot
2098: set jwot.terr_qual_id18 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2099: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2100: and jwot.header = p_header
2101: and jwot.user_sequence = p_user_sequence
2103: and jwot.status is null;
2104: --dbms_output.put_line('18 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2105: when 19 then
2106: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2107: update JTY_WEBADI_OTH_TERR_INTF jwot
2108: set jwot.terr_qual_id19 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2109: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2110: and jwot.header = p_header
2111: and jwot.user_sequence = p_user_sequence
2113: and jwot.status is null;
2114: --dbms_output.put_line('19 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2115: when 20 then
2116: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2117: update JTY_WEBADI_OTH_TERR_INTF jwot
2118: set jwot.terr_qual_id20 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2119: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2120: and jwot.header = p_header
2121: and jwot.user_sequence = p_user_sequence
2123: and jwot.status is null;
2124: --dbms_output.put_line('20 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2125: when 21 then
2126: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2127: update JTY_WEBADI_OTH_TERR_INTF jwot
2128: set jwot.terr_qual_id21 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2129: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2130: and jwot.header = p_header
2131: and jwot.user_sequence = p_user_sequence
2133: and jwot.status is null;
2134: --dbms_output.put_line('21 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2135: when 22 then
2136: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2137: update JTY_WEBADI_OTH_TERR_INTF jwot
2138: set jwot.terr_qual_id22 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2139: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2140: and jwot.header = p_header
2141: and jwot.user_sequence = p_user_sequence
2143: and jwot.status is null;
2144: --dbms_output.put_line('22 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2145: when 23 then
2146: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2147: update JTY_WEBADI_OTH_TERR_INTF jwot
2148: set jwot.terr_qual_id23 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2149: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2150: and jwot.header = p_header
2151: and jwot.user_sequence = p_user_sequence
2153: and jwot.status is null;
2154: --dbms_output.put_line('23 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2155: when 24 then
2156: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2157: update JTY_WEBADI_OTH_TERR_INTF jwot
2158: set jwot.terr_qual_id24 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2159: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2160: and jwot.header = p_header
2161: and jwot.user_sequence = p_user_sequence
2163: and jwot.status is null;
2164: --dbms_output.put_line('24 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2165: when 25 then
2166: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2167: update JTY_WEBADI_OTH_TERR_INTF jwot
2168: set jwot.terr_qual_id25 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2169: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2170: and jwot.header = p_header
2171: and jwot.user_sequence = p_user_sequence
2173: and jwot.status is null;
2174: --dbms_output.put_line('25 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2175: when 26 then
2176: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2177: update JTY_WEBADI_OTH_TERR_INTF jwot
2178: set jwot.terr_qual_id26 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2179: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2180: and jwot.header = p_header
2181: and jwot.user_sequence = p_user_sequence
2183: and jwot.status is null;
2184: --dbms_output.put_line('26 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2185: when 27 then
2186: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2187: update JTY_WEBADI_OTH_TERR_INTF jwot
2188: set jwot.terr_qual_id27 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2189: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2190: and jwot.header = p_header
2191: and jwot.user_sequence = p_user_sequence
2193: and jwot.status is null;
2194: --dbms_output.put_line('27 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2195: when 28 then
2196: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2197: update JTY_WEBADI_OTH_TERR_INTF jwot
2198: set jwot.terr_qual_id28 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2199: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2200: and jwot.header = p_header
2201: and jwot.user_sequence = p_user_sequence
2203: and jwot.status is null;
2204: --dbms_output.put_line('28 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2205: when 29 then
2206: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2207: update JTY_WEBADI_OTH_TERR_INTF jwot
2208: set jwot.terr_qual_id29 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2209: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2210: and jwot.header = p_header
2211: and jwot.user_sequence = p_user_sequence
2214: --dbms_output.put_line('29 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2215:
2216: when 30 then
2217: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2218: update JTY_WEBADI_OTH_TERR_INTF jwot
2219: set jwot.terr_qual_id30 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2220: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2221: and jwot.header = p_header
2222: and jwot.user_sequence = p_user_sequence
2224: and jwot.status is null;
2225: --dbms_output.put_line('30 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2226: when 31 then
2227: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2228: update JTY_WEBADI_OTH_TERR_INTF jwot
2229: set jwot.terr_qual_id31 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2230: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2231: and jwot.header = p_header
2232: and jwot.user_sequence = p_user_sequence
2234: and jwot.status is null;
2235: --dbms_output.put_line('31 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2236: when 32 then
2237: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2238: update JTY_WEBADI_OTH_TERR_INTF jwot
2239: set jwot.terr_qual_id32 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2240: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2241: and jwot.header = p_header
2242: and jwot.user_sequence = p_user_sequence
2244: and jwot.status is null;
2245: --dbms_output.put_line('32 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2246: when 33 then
2247: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2248: update JTY_WEBADI_OTH_TERR_INTF jwot
2249: set jwot.terr_qual_id33 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2250: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2251: and jwot.header = p_header
2252: and jwot.user_sequence = p_user_sequence
2254: and jwot.status is null;
2255: --dbms_output.put_line('33 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2256: when 34 then
2257: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2258: update JTY_WEBADI_OTH_TERR_INTF jwot
2259: set jwot.terr_qual_id34 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2260: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2261: and jwot.header = p_header
2262: and jwot.user_sequence = p_user_sequence
2264: and jwot.status is null;
2265: --dbms_output.put_line('34 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2266: when 35 then
2267: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2268: update JTY_WEBADI_OTH_TERR_INTF jwot
2269: set jwot.terr_qual_id35 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2270: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2271: and jwot.header = p_header
2272: and jwot.user_sequence = p_user_sequence
2274: and jwot.status is null;
2275: --dbms_output.put_line('35 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2276: when 36 then
2277: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2278: update JTY_WEBADI_OTH_TERR_INTF jwot
2279: set jwot.terr_qual_id36 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2280: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2281: and jwot.header = p_header
2282: and jwot.user_sequence = p_user_sequence
2284: and jwot.status is null;
2285: --dbms_output.put_line('36 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2286: when 37 then
2287: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2288: update JTY_WEBADI_OTH_TERR_INTF jwot
2289: set jwot.terr_qual_id37 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2290: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2291: and jwot.header = p_header
2292: and jwot.user_sequence = p_user_sequence
2294: and jwot.status is null;
2295: --dbms_output.put_line('37 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2296: when 38 then
2297: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2298: update JTY_WEBADI_OTH_TERR_INTF jwot
2299: set jwot.terr_qual_id38 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2300: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2301: and jwot.header = p_header
2302: and jwot.user_sequence = p_user_sequence
2304: and jwot.status is null;
2305: --dbms_output.put_line('38 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2306: when 39 then
2307: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2308: update JTY_WEBADI_OTH_TERR_INTF jwot
2309: set jwot.terr_qual_id39 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2310: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2311: and jwot.header = p_header
2312: and jwot.user_sequence = p_user_sequence
2314: and jwot.status is null;
2315: --dbms_output.put_line('39 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2316: when 40 then
2317: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2318: update JTY_WEBADI_OTH_TERR_INTF jwot
2319: set jwot.terr_qual_id40 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2320: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2321: and jwot.header = p_header
2322: and jwot.user_sequence = p_user_sequence
2324: and jwot.status is null;
2325: --dbms_output.put_line('40 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2326: when 41 then
2327: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2328: update JTY_WEBADI_OTH_TERR_INTF jwot
2329: set jwot.terr_qual_id41 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2330: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2331: and jwot.header = p_header
2332: and jwot.user_sequence = p_user_sequence
2334: and jwot.status is null;
2335: --dbms_output.put_line('41 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2336: when 42 then
2337: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2338: update JTY_WEBADI_OTH_TERR_INTF jwot
2339: set jwot.terr_qual_id42 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2340: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2341: and jwot.header = p_header
2342: and jwot.user_sequence = p_user_sequence
2344: and jwot.status is null;
2345: --dbms_output.put_line('42 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2346: when 43 then
2347: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2348: update JTY_WEBADI_OTH_TERR_INTF jwot
2349: set jwot.terr_qual_id43 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2350: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2351: and jwot.header = p_header
2352: and jwot.user_sequence = p_user_sequence
2354: and jwot.status is null;
2355: --dbms_output.put_line('43 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2356: when 44 then
2357: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2358: update JTY_WEBADI_OTH_TERR_INTF jwot
2359: set jwot.terr_qual_id44 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2360: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2361: and jwot.header = p_header
2362: and jwot.user_sequence = p_user_sequence
2364: and jwot.status is null;
2365: --dbms_output.put_line('44 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2366: when 45 then
2367: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2368: update JTY_WEBADI_OTH_TERR_INTF jwot
2369: set jwot.terr_qual_id45 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2370: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2371: and jwot.header = p_header
2372: and jwot.user_sequence = p_user_sequence
2374: and jwot.status is null;
2375: --dbms_output.put_line('45 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2376: when 46 then
2377: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2378: update JTY_WEBADI_OTH_TERR_INTF jwot
2379: set jwot.terr_qual_id46 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2380: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2381: and jwot.header = p_header
2382: and jwot.user_sequence = p_user_sequence
2384: and jwot.status is null;
2385: --dbms_output.put_line('46 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2386: when 47 then
2387: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2388: update JTY_WEBADI_OTH_TERR_INTF jwot
2389: set jwot.terr_qual_id47 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2390: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2391: and jwot.header = p_header
2392: and jwot.user_sequence = p_user_sequence
2394: and jwot.status is null;
2395: --dbms_output.put_line('47 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2396: when 48 then
2397: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2398: update JTY_WEBADI_OTH_TERR_INTF jwot
2399: set jwot.terr_qual_id48 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2400: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2401: and jwot.header = p_header
2402: and jwot.user_sequence = p_user_sequence
2404: and jwot.status is null;
2405: --dbms_output.put_line('48 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2406: when 49 then
2407: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2408: update JTY_WEBADI_OTH_TERR_INTF jwot
2409: set jwot.terr_qual_id49 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2410: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2411: and jwot.header = p_header
2412: and jwot.user_sequence = p_user_sequence
2414: and jwot.status is null;
2415: --dbms_output.put_line('49 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2416: when 50 then
2417: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2418: update JTY_WEBADI_OTH_TERR_INTF jwot
2419: set jwot.terr_qual_id50 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2420: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2421: and jwot.header = p_header
2422: and jwot.user_sequence = p_user_sequence
2424: and jwot.status is null;
2425: --dbms_output.put_line('50 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2426: when 51 then
2427: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2428: update JTY_WEBADI_OTH_TERR_INTF jwot
2429: set jwot.terr_qual_id51 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2430: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2431: and jwot.header = p_header
2432: and jwot.user_sequence = p_user_sequence
2434: and jwot.status is null;
2435: --dbms_output.put_line('51 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2436: when 52 then
2437: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2438: update JTY_WEBADI_OTH_TERR_INTF jwot
2439: set jwot.terr_qual_id52 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2440: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2441: and jwot.header = p_header
2442: and jwot.user_sequence = p_user_sequence
2444: and jwot.status is null;
2445: --dbms_output.put_line('52 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2446: when 53 then
2447: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2448: update JTY_WEBADI_OTH_TERR_INTF jwot
2449: set jwot.terr_qual_id53 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2450: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2451: and jwot.header = p_header
2452: and jwot.user_sequence = p_user_sequence
2454: and jwot.status is null;
2455: --dbms_output.put_line('53 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2456: when 54 then
2457: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2458: update JTY_WEBADI_OTH_TERR_INTF jwot
2459: set jwot.terr_qual_id54 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2460: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2461: and jwot.header = p_header
2462: and jwot.user_sequence = p_user_sequence
2464: and jwot.status is null;
2465: --dbms_output.put_line('54 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2466: when 55 then
2467: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2468: update JTY_WEBADI_OTH_TERR_INTF jwot
2469: set jwot.terr_qual_id55 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2470: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2471: and jwot.header = p_header
2472: and jwot.user_sequence = p_user_sequence
2474: and jwot.status is null;
2475: --dbms_output.put_line('55 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2476: when 56 then
2477: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2478: update JTY_WEBADI_OTH_TERR_INTF jwot
2479: set jwot.terr_qual_id56 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2480: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2481: and jwot.header = p_header
2482: and jwot.user_sequence = p_user_sequence
2484: and jwot.status is null;
2485: --dbms_output.put_line('56 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2486: when 57 then
2487: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2488: update JTY_WEBADI_OTH_TERR_INTF jwot
2489: set jwot.terr_qual_id57 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2490: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2491: and jwot.header = p_header
2492: and jwot.user_sequence = p_user_sequence
2494: and jwot.status is null;
2495: --dbms_output.put_line('57 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2496: when 58 then
2497: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2498: update JTY_WEBADI_OTH_TERR_INTF jwot
2499: set jwot.terr_qual_id58 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2500: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2501: and jwot.header = p_header
2502: and jwot.user_sequence = p_user_sequence
2504: and jwot.status is null;
2505: --dbms_output.put_line('58 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2506: when 59 then
2507: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2508: update JTY_WEBADI_OTH_TERR_INTF jwot
2509: set jwot.terr_qual_id59 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2510: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2511: and jwot.header = p_header
2512: and jwot.user_sequence = p_user_sequence
2514: and jwot.status is null;
2515: --dbms_output.put_line('59 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2516: when 60 then
2517: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2518: update JTY_WEBADI_OTH_TERR_INTF jwot
2519: set jwot.terr_qual_id60 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2520: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2521: and jwot.header = p_header
2522: and jwot.user_sequence = p_user_sequence
2524: and jwot.status is null;
2525: --dbms_output.put_line('60 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2526: when 61 then
2527: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2528: update JTY_WEBADI_OTH_TERR_INTF jwot
2529: set jwot.terr_qual_id61 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2530: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2531: and jwot.header = p_header
2532: and jwot.user_sequence = p_user_sequence
2534: and jwot.status is null;
2535: --dbms_output.put_line('61 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2536: when 62 then
2537: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2538: update JTY_WEBADI_OTH_TERR_INTF jwot
2539: set jwot.terr_qual_id62 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2540: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2541: and jwot.header = p_header
2542: and jwot.user_sequence = p_user_sequence
2544: and jwot.status is null;
2545: --dbms_output.put_line('62 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2546: when 63 then
2547: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2548: update JTY_WEBADI_OTH_TERR_INTF jwot
2549: set jwot.terr_qual_id63 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2550: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2551: and jwot.header = p_header
2552: and jwot.user_sequence = p_user_sequence
2554: and jwot.status is null;
2555: --dbms_output.put_line('63 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2556: when 64 then
2557: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2558: update JTY_WEBADI_OTH_TERR_INTF jwot
2559: set jwot.terr_qual_id64 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2560: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2561: and jwot.header = p_header
2562: and jwot.user_sequence = p_user_sequence
2564: and jwot.status is null;
2565: --dbms_output.put_line('64 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2566: when 65 then
2567: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2568: update JTY_WEBADI_OTH_TERR_INTF jwot
2569: set jwot.terr_qual_id65 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2570: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2571: and jwot.header = p_header
2572: and jwot.user_sequence = p_user_sequence
2574: and jwot.status is null;
2575: --dbms_output.put_line('65 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2576: when 66 then
2577: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2578: update JTY_WEBADI_OTH_TERR_INTF jwot
2579: set jwot.terr_qual_id66 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2580: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2581: and jwot.header = p_header
2582: and jwot.user_sequence = p_user_sequence
2584: and jwot.status is null;
2585: --dbms_output.put_line('66 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2586: when 67 then
2587: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2588: update JTY_WEBADI_OTH_TERR_INTF jwot
2589: set jwot.terr_qual_id67 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2590: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2591: and jwot.header = p_header
2592: and jwot.user_sequence = p_user_sequence
2594: and jwot.status is null;
2595: --dbms_output.put_line('67 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2596: when 68 then
2597: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2598: update JTY_WEBADI_OTH_TERR_INTF jwot
2599: set jwot.terr_qual_id68 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2600: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2601: and jwot.header = p_header
2602: and jwot.user_sequence = p_user_sequence
2604: and jwot.status is null;
2605: --dbms_output.put_line('68 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2606: when 69 then
2607: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2608: update JTY_WEBADI_OTH_TERR_INTF jwot
2609: set jwot.terr_qual_id69 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2610: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2611: and jwot.header = p_header
2612: and jwot.user_sequence = p_user_sequence
2615: --dbms_output.put_line('69 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2616:
2617: when 70 then
2618: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2619: update JTY_WEBADI_OTH_TERR_INTF jwot
2620: set jwot.terr_qual_id70 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2621: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2622: and jwot.header = p_header
2623: and jwot.user_sequence = p_user_sequence
2625: and jwot.status is null;
2626: --dbms_output.put_line('70 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2627: when 71 then
2628: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2629: update JTY_WEBADI_OTH_TERR_INTF jwot
2630: set jwot.terr_qual_id71 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2631: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2632: and jwot.header = p_header
2633: and jwot.user_sequence = p_user_sequence
2635: and jwot.status is null;
2636: --dbms_output.put_line('71 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2637: when 72 then
2638: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2639: update JTY_WEBADI_OTH_TERR_INTF jwot
2640: set jwot.terr_qual_id72 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2641: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2642: and jwot.header = p_header
2643: and jwot.user_sequence = p_user_sequence
2645: and jwot.status is null;
2646: --dbms_output.put_line('72 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2647: when 73 then
2648: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2649: update JTY_WEBADI_OTH_TERR_INTF jwot
2650: set jwot.terr_qual_id73 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2651: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2652: and jwot.header = p_header
2653: and jwot.user_sequence = p_user_sequence
2655: and jwot.status is null;
2656: --dbms_output.put_line('73 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2657: when 74 then
2658: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2659: update JTY_WEBADI_OTH_TERR_INTF jwot
2660: set jwot.terr_qual_id74 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2661: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2662: and jwot.header = p_header
2663: and jwot.user_sequence = p_user_sequence
2665: and jwot.status is null;
2666: --dbms_output.put_line('74 Update terr_qual_id, actual row processed: '||SQL%ROWCOUNT);
2667: when 75 then
2668: forall j in l_terr_qual_rec.lay_seq_num.first..l_terr_qual_rec.lay_seq_num.last
2669: update JTY_WEBADI_OTH_TERR_INTF jwot
2670: set jwot.terr_qual_id75 = l_Terr_Qual_Rec.TERR_QUAL_ID(j)
2671: where jwot.lay_seq_num = l_terr_qual_rec.lay_seq_num(j)
2672: and jwot.header = p_header
2673: and jwot.user_sequence = p_user_sequence
2682:
2683: --Bug 7622791 : Updating all the entries (Excpet the first) with action_flag 'C' (Create) to 'U' (Update) will mean the newly created entry needs to be updated.
2684: --This is wrong as update will not happen as its a new entry and need to created (Inserted).
2685: /*
2686: UPDATE JTY_WEBADI_OTH_TERR_INTF jwot
2687: SET ACTION_FLAG = 'U'
2688: WHERE LAY_SEQ_NUM not in
2689: ( SELECT MIN(jwot2.LAY_SEQ_NUM)
2690: FROM JTY_WEBADI_OTH_TERR_INTF jwot2
2686: UPDATE JTY_WEBADI_OTH_TERR_INTF jwot
2687: SET ACTION_FLAG = 'U'
2688: WHERE LAY_SEQ_NUM not in
2689: ( SELECT MIN(jwot2.LAY_SEQ_NUM)
2690: FROM JTY_WEBADI_OTH_TERR_INTF jwot2
2691: WHERE jwot.ACTION_FLAG = jwot2.ACTION_FLAG
2692: and jwot.header = jwot2.header
2693: AND jwot.USER_SEQUENCE = jwot2.USER_SEQUENCE
2694: AND jwot.interface_type = jwot2.interface_type
2714: v_intf_type varchar2,
2715: v_header varchar2
2716: ) IS
2717: SELECT TERR_ID, lay_seq_num
2718: FROM JTY_WEBADI_OTH_TERR_INTF
2719: WHERE interface_type = v_intf_type
2720: AND action_flag = v_action_flag
2721: AND user_sequence = v_user_sequence
2722: AND header = v_header
2729: v_header varchar2
2730: ) IS
2731: select sub.terr_qual_id, sub.lay_seq_num
2732: from ( select terr_qual_id1 terr_qual_id, lay_seq_num
2733: from JTY_WEBADI_OTH_TERR_INTF jwot
2734: WHERE jwot.user_sequence = v_user_sequence
2735: and jwot.action_flag = v_action_flag
2736: and jwot.interface_type = v_intf_type
2737: and jwot.header = v_header
2738: and jwot.qual1_value_id is not null
2739: and jwot.status is null
2740: union all
2741: select terr_qual_id2 terr_qual_id, lay_seq_num
2742: from JTY_WEBADI_OTH_TERR_INTF jwot
2743: WHERE jwot.user_sequence = v_user_sequence
2744: and jwot.action_flag = v_action_flag
2745: and jwot.interface_type = v_intf_type
2746: and jwot.header = v_header
2747: and jwot.qual2_value_id is not null
2748: and jwot.status is null
2749: union all
2750: select terr_qual_id3 terr_qual_id, lay_seq_num
2751: from JTY_WEBADI_OTH_TERR_INTF jwot
2752: WHERE jwot.user_sequence = v_user_sequence
2753: and jwot.action_flag = v_action_flag
2754: and jwot.interface_type = v_intf_type
2755: and jwot.header = v_header
2756: and jwot.qual3_value_id is not null
2757: and jwot.status is null
2758: union all
2759: select terr_qual_id4 terr_qual_id, lay_seq_num
2760: from JTY_WEBADI_OTH_TERR_INTF jwot
2761: WHERE jwot.user_sequence = v_user_sequence
2762: and jwot.action_flag = v_action_flag
2763: and jwot.interface_type = v_intf_type
2764: and jwot.header = v_header
2765: and jwot.qual4_value_id is not null
2766: and jwot.status is null
2767: union all
2768: select terr_qual_id5 terr_qual_id, lay_seq_num
2769: from JTY_WEBADI_OTH_TERR_INTF jwot
2770: WHERE jwot.user_sequence = v_user_sequence
2771: and jwot.action_flag = v_action_flag
2772: and jwot.interface_type = v_intf_type
2773: and jwot.header = v_header
2774: and jwot.qual5_value_id is not null
2775: and jwot.status is null
2776: union all
2777: select terr_qual_id6 terr_qual_id, lay_seq_num
2778: from JTY_WEBADI_OTH_TERR_INTF jwot
2779: WHERE jwot.user_sequence = v_user_sequence
2780: and jwot.action_flag = v_action_flag
2781: and jwot.interface_type = v_intf_type
2782: and jwot.header = v_header
2783: and jwot.qual6_value_id is not null
2784: and jwot.status is null
2785: union all
2786: select terr_qual_id7 terr_qual_id, lay_seq_num
2787: from JTY_WEBADI_OTH_TERR_INTF jwot
2788: WHERE jwot.user_sequence = v_user_sequence
2789: and jwot.action_flag = v_action_flag
2790: and jwot.interface_type = v_intf_type
2791: and jwot.header = v_header
2792: and jwot.qual7_value_id is not null
2793: and jwot.status is null
2794: union all
2795: select terr_qual_id8 terr_qual_id, lay_seq_num
2796: from JTY_WEBADI_OTH_TERR_INTF jwot
2797: WHERE jwot.user_sequence = v_user_sequence
2798: and jwot.action_flag = v_action_flag
2799: and jwot.interface_type = v_intf_type
2800: and jwot.header = v_header
2801: and jwot.qual8_value_id is not null
2802: and jwot.status is null
2803: union all
2804: select terr_qual_id9 terr_qual_id, lay_seq_num
2805: from JTY_WEBADI_OTH_TERR_INTF jwot
2806: WHERE jwot.user_sequence = v_user_sequence
2807: and jwot.action_flag = v_action_flag
2808: and jwot.interface_type = v_intf_type
2809: and jwot.header = v_header
2810: and jwot.qual9_value_id is not null
2811: and jwot.status is null
2812: union all
2813: select terr_qual_id10 terr_qual_id, lay_seq_num
2814: from JTY_WEBADI_OTH_TERR_INTF jwot
2815: WHERE jwot.user_sequence = v_user_sequence
2816: and jwot.action_flag = v_action_flag
2817: and jwot.interface_type = v_intf_type
2818: and jwot.header = v_header
2819: and jwot.qual10_value_id is not null
2820: and jwot.status is null
2821: union all
2822: select terr_qual_id11 terr_qual_id, lay_seq_num
2823: from JTY_WEBADI_OTH_TERR_INTF jwot
2824: WHERE jwot.user_sequence = v_user_sequence
2825: and jwot.action_flag = v_action_flag
2826: and jwot.interface_type = v_intf_type
2827: and jwot.header = v_header
2828: and jwot.qual11_value_id is not null
2829: and jwot.status is null
2830: union all
2831: select terr_qual_id12 terr_qual_id, lay_seq_num
2832: from JTY_WEBADI_OTH_TERR_INTF jwot
2833: WHERE jwot.user_sequence = v_user_sequence
2834: and jwot.action_flag = v_action_flag
2835: and jwot.interface_type = v_intf_type
2836: and jwot.header = v_header
2837: and jwot.qual12_value_id is not null
2838: and jwot.status is null
2839: union all
2840: select terr_qual_id13 terr_qual_id, lay_seq_num
2841: from JTY_WEBADI_OTH_TERR_INTF jwot
2842: WHERE jwot.user_sequence = v_user_sequence
2843: and jwot.action_flag = v_action_flag
2844: and jwot.interface_type = v_intf_type
2845: and jwot.header = v_header
2846: and jwot.qual13_value_id is not null
2847: and jwot.status is null
2848: union all
2849: select terr_qual_id14 terr_qual_id, lay_seq_num
2850: from JTY_WEBADI_OTH_TERR_INTF jwot
2851: WHERE jwot.user_sequence = v_user_sequence
2852: and jwot.action_flag = v_action_flag
2853: and jwot.interface_type = v_intf_type
2854: and jwot.header = v_header
2855: and jwot.qual14_value_id is not null
2856: and jwot.status is null
2857: union all
2858: select terr_qual_id15 terr_qual_id, lay_seq_num
2859: from JTY_WEBADI_OTH_TERR_INTF jwot
2860: WHERE jwot.user_sequence = v_user_sequence
2861: and jwot.action_flag = v_action_flag
2862: and jwot.interface_type = v_intf_type
2863: and jwot.header = v_header
2864: and jwot.qual15_value_id is not null
2865: and jwot.status is null
2866: union all
2867: select terr_qual_id16 terr_qual_id, lay_seq_num
2868: from JTY_WEBADI_OTH_TERR_INTF jwot
2869: WHERE jwot.user_sequence = v_user_sequence
2870: and jwot.action_flag = v_action_flag
2871: and jwot.interface_type = v_intf_type
2872: and jwot.header = v_header
2873: and jwot.qual16_value_id is not null
2874: and jwot.status is null
2875: union all
2876: select terr_qual_id17 terr_qual_id, lay_seq_num
2877: from JTY_WEBADI_OTH_TERR_INTF jwot
2878: WHERE jwot.user_sequence = v_user_sequence
2879: and jwot.action_flag = v_action_flag
2880: and jwot.interface_type = v_intf_type
2881: and jwot.header = v_header
2882: and jwot.qual17_value_id is not null
2883: and jwot.status is null
2884: union all
2885: select terr_qual_id18 terr_qual_id, lay_seq_num
2886: from JTY_WEBADI_OTH_TERR_INTF jwot
2887: WHERE jwot.user_sequence = v_user_sequence
2888: and jwot.action_flag = v_action_flag
2889: and jwot.interface_type = v_intf_type
2890: and jwot.header = v_header
2891: and jwot.qual18_value_id is not null
2892: and jwot.status is null
2893: union all
2894: select terr_qual_id19 terr_qual_id, lay_seq_num
2895: from JTY_WEBADI_OTH_TERR_INTF jwot
2896: WHERE jwot.user_sequence = v_user_sequence
2897: and jwot.action_flag = v_action_flag
2898: and jwot.interface_type = v_intf_type
2899: and jwot.header = v_header
2900: and jwot.qual19_value_id is not null
2901: and jwot.status is null
2902: union all
2903: select terr_qual_id20 terr_qual_id, lay_seq_num
2904: from JTY_WEBADI_OTH_TERR_INTF jwot
2905: WHERE jwot.user_sequence = v_user_sequence
2906: and jwot.action_flag = v_action_flag
2907: and jwot.interface_type = v_intf_type
2908: and jwot.header = v_header
2909: and jwot.qual20_value_id is not null
2910: and jwot.status is null
2911: union all
2912: select terr_qual_id21 terr_qual_id, lay_seq_num
2913: from JTY_WEBADI_OTH_TERR_INTF jwot
2914: WHERE jwot.user_sequence = v_user_sequence
2915: and jwot.action_flag = v_action_flag
2916: and jwot.interface_type = v_intf_type
2917: and jwot.header = v_header
2918: and jwot.qual21_value_id is not null
2919: and jwot.status is null
2920: union all
2921: select terr_qual_id22 terr_qual_id, lay_seq_num
2922: from JTY_WEBADI_OTH_TERR_INTF jwot
2923: WHERE jwot.user_sequence = v_user_sequence
2924: and jwot.action_flag = v_action_flag
2925: and jwot.interface_type = v_intf_type
2926: and jwot.header = v_header
2927: and jwot.qual22_value_id is not null
2928: and jwot.status is null
2929: union all
2930: select terr_qual_id23 terr_qual_id, lay_seq_num
2931: from JTY_WEBADI_OTH_TERR_INTF jwot
2932: WHERE jwot.user_sequence = v_user_sequence
2933: and jwot.action_flag = v_action_flag
2934: and jwot.interface_type = v_intf_type
2935: and jwot.header = v_header
2936: and jwot.qual23_value_id is not null
2937: and jwot.status is null
2938: union all
2939: select terr_qual_id24 terr_qual_id, lay_seq_num
2940: from JTY_WEBADI_OTH_TERR_INTF jwot
2941: WHERE jwot.user_sequence = v_user_sequence
2942: and jwot.action_flag = v_action_flag
2943: and jwot.interface_type = v_intf_type
2944: and jwot.header = v_header
2945: and jwot.qual24_value_id is not null
2946: and jwot.status is null
2947: union all
2948: select terr_qual_id25 terr_qual_id, lay_seq_num
2949: from JTY_WEBADI_OTH_TERR_INTF jwot
2950: WHERE jwot.user_sequence = v_user_sequence
2951: and jwot.action_flag = v_action_flag
2952: and jwot.interface_type = v_intf_type
2953: and jwot.header = v_header
2954: and jwot.qual25_value_id is not null
2955: and jwot.status is null
2956: union all
2957: select terr_qual_id26 terr_qual_id, lay_seq_num
2958: from JTY_WEBADI_OTH_TERR_INTF jwot
2959: WHERE jwot.user_sequence = v_user_sequence
2960: and jwot.action_flag = v_action_flag
2961: and jwot.interface_type = v_intf_type
2962: and jwot.header = v_header
2963: and jwot.qual26_value_id is not null
2964: and jwot.status is null
2965: union all
2966: select terr_qual_id27 terr_qual_id, lay_seq_num
2967: from JTY_WEBADI_OTH_TERR_INTF jwot
2968: WHERE jwot.user_sequence = v_user_sequence
2969: and jwot.action_flag = v_action_flag
2970: and jwot.interface_type = v_intf_type
2971: and jwot.header = v_header
2972: and jwot.qual27_value_id is not null
2973: and jwot.status is null
2974: union all
2975: select terr_qual_id28 terr_qual_id, lay_seq_num
2976: from JTY_WEBADI_OTH_TERR_INTF jwot
2977: WHERE jwot.user_sequence = v_user_sequence
2978: and jwot.action_flag = v_action_flag
2979: and jwot.interface_type = v_intf_type
2980: and jwot.header = v_header
2981: and jwot.qual28_value_id is not null
2982: and jwot.status is null
2983: union all
2984: select terr_qual_id29 terr_qual_id, lay_seq_num
2985: from JTY_WEBADI_OTH_TERR_INTF jwot
2986: WHERE jwot.user_sequence = v_user_sequence
2987: and jwot.action_flag = v_action_flag
2988: and jwot.interface_type = v_intf_type
2989: and jwot.header = v_header
2990: and jwot.qual29_value_id is not null
2991: and jwot.status is null
2992: union all
2993: select terr_qual_id30 terr_qual_id, lay_seq_num
2994: from JTY_WEBADI_OTH_TERR_INTF jwot
2995: WHERE jwot.user_sequence = v_user_sequence
2996: and jwot.action_flag = v_action_flag
2997: and jwot.interface_type = v_intf_type
2998: and jwot.header = v_header
2999: and jwot.qual30_value_id is not null
3000: and jwot.status is null
3001: union all
3002: select terr_qual_id31 terr_qual_id, lay_seq_num
3003: from JTY_WEBADI_OTH_TERR_INTF jwot
3004: WHERE jwot.user_sequence = v_user_sequence
3005: and jwot.action_flag = v_action_flag
3006: and jwot.interface_type = v_intf_type
3007: and jwot.header = v_header
3008: and jwot.qual31_value_id is not null
3009: and jwot.status is null
3010: union all
3011: select terr_qual_id32 terr_qual_id, lay_seq_num
3012: from JTY_WEBADI_OTH_TERR_INTF jwot
3013: WHERE jwot.user_sequence = v_user_sequence
3014: and jwot.action_flag = v_action_flag
3015: and jwot.interface_type = v_intf_type
3016: and jwot.header = v_header
3017: and jwot.qual32_value_id is not null
3018: and jwot.status is null
3019: union all
3020: select terr_qual_id33 terr_qual_id, lay_seq_num
3021: from JTY_WEBADI_OTH_TERR_INTF jwot
3022: WHERE jwot.user_sequence = v_user_sequence
3023: and jwot.action_flag = v_action_flag
3024: and jwot.interface_type = v_intf_type
3025: and jwot.header = v_header
3026: and jwot.qual33_value_id is not null
3027: and jwot.status is null
3028: union all
3029: select terr_qual_id34 terr_qual_id, lay_seq_num
3030: from JTY_WEBADI_OTH_TERR_INTF jwot
3031: WHERE jwot.user_sequence = v_user_sequence
3032: and jwot.action_flag = v_action_flag
3033: and jwot.interface_type = v_intf_type
3034: and jwot.header = v_header
3035: and jwot.qual34_value_id is not null
3036: and jwot.status is null
3037: union all
3038: select terr_qual_id35 terr_qual_id, lay_seq_num
3039: from JTY_WEBADI_OTH_TERR_INTF jwot
3040: WHERE jwot.user_sequence = v_user_sequence
3041: and jwot.action_flag = v_action_flag
3042: and jwot.interface_type = v_intf_type
3043: and jwot.header = v_header
3044: and jwot.qual35_value_id is not null
3045: and jwot.status is null
3046: union all
3047: select terr_qual_id36 terr_qual_id, lay_seq_num
3048: from JTY_WEBADI_OTH_TERR_INTF jwot
3049: WHERE jwot.user_sequence = v_user_sequence
3050: and jwot.action_flag = v_action_flag
3051: and jwot.interface_type = v_intf_type
3052: and jwot.header = v_header
3053: and jwot.qual36_value_id is not null
3054: and jwot.status is null
3055: union all
3056: select terr_qual_id37 terr_qual_id, lay_seq_num
3057: from JTY_WEBADI_OTH_TERR_INTF jwot
3058: WHERE jwot.user_sequence = v_user_sequence
3059: and jwot.action_flag = v_action_flag
3060: and jwot.interface_type = v_intf_type
3061: and jwot.header = v_header
3062: and jwot.qual37_value_id is not null
3063: and jwot.status is null
3064: union all
3065: select terr_qual_id38 terr_qual_id, lay_seq_num
3066: from JTY_WEBADI_OTH_TERR_INTF jwot
3067: WHERE jwot.user_sequence = v_user_sequence
3068: and jwot.action_flag = v_action_flag
3069: and jwot.interface_type = v_intf_type
3070: and jwot.header = v_header
3071: and jwot.qual38_value_id is not null
3072: and jwot.status is null
3073: union all
3074: select terr_qual_id39 terr_qual_id, lay_seq_num
3075: from JTY_WEBADI_OTH_TERR_INTF jwot
3076: WHERE jwot.user_sequence = v_user_sequence
3077: and jwot.action_flag = v_action_flag
3078: and jwot.interface_type = v_intf_type
3079: and jwot.header = v_header
3080: and jwot.qual39_value_id is not null
3081: and jwot.status is null
3082: union all
3083: select terr_qual_id40 terr_qual_id, lay_seq_num
3084: from JTY_WEBADI_OTH_TERR_INTF jwot
3085: WHERE jwot.user_sequence = v_user_sequence
3086: and jwot.action_flag = v_action_flag
3087: and jwot.interface_type = v_intf_type
3088: and jwot.header = v_header
3089: and jwot.qual40_value_id is not null
3090: and jwot.status is null
3091: union all
3092: select terr_qual_id41 terr_qual_id, lay_seq_num
3093: from JTY_WEBADI_OTH_TERR_INTF jwot
3094: WHERE jwot.user_sequence = v_user_sequence
3095: and jwot.action_flag = v_action_flag
3096: and jwot.interface_type = v_intf_type
3097: and jwot.header = v_header
3098: and jwot.qual41_value_id is not null
3099: and jwot.status is null
3100: union all
3101: select terr_qual_id42 terr_qual_id, lay_seq_num
3102: from JTY_WEBADI_OTH_TERR_INTF jwot
3103: WHERE jwot.user_sequence = v_user_sequence
3104: and jwot.action_flag = v_action_flag
3105: and jwot.interface_type = v_intf_type
3106: and jwot.header = v_header
3107: and jwot.qual42_value_id is not null
3108: and jwot.status is null
3109: union all
3110: select terr_qual_id43 terr_qual_id, lay_seq_num
3111: from JTY_WEBADI_OTH_TERR_INTF jwot
3112: WHERE jwot.user_sequence = v_user_sequence
3113: and jwot.action_flag = v_action_flag
3114: and jwot.interface_type = v_intf_type
3115: and jwot.header = v_header
3116: and jwot.qual43_value_id is not null
3117: and jwot.status is null
3118: union all
3119: select terr_qual_id44 terr_qual_id, lay_seq_num
3120: from JTY_WEBADI_OTH_TERR_INTF jwot
3121: WHERE jwot.user_sequence = v_user_sequence
3122: and jwot.action_flag = v_action_flag
3123: and jwot.interface_type = v_intf_type
3124: and jwot.header = v_header
3125: and jwot.qual44_value_id is not null
3126: and jwot.status is null
3127: union all
3128: select terr_qual_id45 terr_qual_id, lay_seq_num
3129: from JTY_WEBADI_OTH_TERR_INTF jwot
3130: WHERE jwot.user_sequence = v_user_sequence
3131: and jwot.action_flag = v_action_flag
3132: and jwot.interface_type = v_intf_type
3133: and jwot.header = v_header
3134: and jwot.qual45_value_id is not null
3135: and jwot.status is null
3136: union all
3137: select terr_qual_id46 terr_qual_id, lay_seq_num
3138: from JTY_WEBADI_OTH_TERR_INTF jwot
3139: WHERE jwot.user_sequence = v_user_sequence
3140: and jwot.action_flag = v_action_flag
3141: and jwot.interface_type = v_intf_type
3142: and jwot.header = v_header
3143: and jwot.qual46_value_id is not null
3144: and jwot.status is null
3145: union all
3146: select terr_qual_id47 terr_qual_id, lay_seq_num
3147: from JTY_WEBADI_OTH_TERR_INTF jwot
3148: WHERE jwot.user_sequence = v_user_sequence
3149: and jwot.action_flag = v_action_flag
3150: and jwot.interface_type = v_intf_type
3151: and jwot.header = v_header
3152: and jwot.qual47_value_id is not null
3153: and jwot.status is null
3154: union all
3155: select terr_qual_id48 terr_qual_id, lay_seq_num
3156: from JTY_WEBADI_OTH_TERR_INTF jwot
3157: WHERE jwot.user_sequence = v_user_sequence
3158: and jwot.action_flag = v_action_flag
3159: and jwot.interface_type = v_intf_type
3160: and jwot.header = v_header
3161: and jwot.qual48_value_id is not null
3162: and jwot.status is null
3163: union all
3164: select terr_qual_id49 terr_qual_id, lay_seq_num
3165: from JTY_WEBADI_OTH_TERR_INTF jwot
3166: WHERE jwot.user_sequence = v_user_sequence
3167: and jwot.action_flag = v_action_flag
3168: and jwot.interface_type = v_intf_type
3169: and jwot.header = v_header
3170: and jwot.qual49_value_id is not null
3171: and jwot.status is null
3172: union all
3173: select terr_qual_id50 terr_qual_id, lay_seq_num
3174: from JTY_WEBADI_OTH_TERR_INTF jwot
3175: WHERE jwot.user_sequence = v_user_sequence
3176: and jwot.action_flag = v_action_flag
3177: and jwot.interface_type = v_intf_type
3178: and jwot.header = v_header
3179: and jwot.qual50_value_id is not null
3180: and jwot.status is null
3181: union all
3182: select terr_qual_id51 terr_qual_id, lay_seq_num
3183: from JTY_WEBADI_OTH_TERR_INTF jwot
3184: WHERE jwot.user_sequence = v_user_sequence
3185: and jwot.action_flag = v_action_flag
3186: and jwot.interface_type = v_intf_type
3187: and jwot.header = v_header
3188: and jwot.qual51_value_id is not null
3189: and jwot.status is null
3190: union all
3191: select terr_qual_id52 terr_qual_id, lay_seq_num
3192: from JTY_WEBADI_OTH_TERR_INTF jwot
3193: WHERE jwot.user_sequence = v_user_sequence
3194: and jwot.action_flag = v_action_flag
3195: and jwot.interface_type = v_intf_type
3196: and jwot.header = v_header
3197: and jwot.qual52_value_id is not null
3198: and jwot.status is null
3199: union all
3200: select terr_qual_id53 terr_qual_id, lay_seq_num
3201: from JTY_WEBADI_OTH_TERR_INTF jwot
3202: WHERE jwot.user_sequence = v_user_sequence
3203: and jwot.action_flag = v_action_flag
3204: and jwot.interface_type = v_intf_type
3205: and jwot.header = v_header
3206: and jwot.qual53_value_id is not null
3207: and jwot.status is null
3208: union all
3209: select terr_qual_id54 terr_qual_id, lay_seq_num
3210: from JTY_WEBADI_OTH_TERR_INTF jwot
3211: WHERE jwot.user_sequence = v_user_sequence
3212: and jwot.action_flag = v_action_flag
3213: and jwot.interface_type = v_intf_type
3214: and jwot.header = v_header
3215: and jwot.qual54_value_id is not null
3216: and jwot.status is null
3217: union all
3218: select terr_qual_id55 terr_qual_id, lay_seq_num
3219: from JTY_WEBADI_OTH_TERR_INTF jwot
3220: WHERE jwot.user_sequence = v_user_sequence
3221: and jwot.action_flag = v_action_flag
3222: and jwot.interface_type = v_intf_type
3223: and jwot.header = v_header
3224: and jwot.qual55_value_id is not null
3225: and jwot.status is null
3226: union all
3227: select terr_qual_id56 terr_qual_id, lay_seq_num
3228: from JTY_WEBADI_OTH_TERR_INTF jwot
3229: WHERE jwot.user_sequence = v_user_sequence
3230: and jwot.action_flag = v_action_flag
3231: and jwot.interface_type = v_intf_type
3232: and jwot.header = v_header
3233: and jwot.qual56_value_id is not null
3234: and jwot.status is null
3235: union all
3236: select terr_qual_id57 terr_qual_id, lay_seq_num
3237: from JTY_WEBADI_OTH_TERR_INTF jwot
3238: WHERE jwot.user_sequence = v_user_sequence
3239: and jwot.action_flag = v_action_flag
3240: and jwot.interface_type = v_intf_type
3241: and jwot.header = v_header
3242: and jwot.qual57_value_id is not null
3243: and jwot.status is null
3244: union all
3245: select terr_qual_id58 terr_qual_id, lay_seq_num
3246: from JTY_WEBADI_OTH_TERR_INTF jwot
3247: WHERE jwot.user_sequence = v_user_sequence
3248: and jwot.action_flag = v_action_flag
3249: and jwot.interface_type = v_intf_type
3250: and jwot.header = v_header
3251: and jwot.qual58_value_id is not null
3252: and jwot.status is null
3253: union all
3254: select terr_qual_id59 terr_qual_id, lay_seq_num
3255: from JTY_WEBADI_OTH_TERR_INTF jwot
3256: WHERE jwot.user_sequence = v_user_sequence
3257: and jwot.action_flag = v_action_flag
3258: and jwot.interface_type = v_intf_type
3259: and jwot.header = v_header
3260: and jwot.qual59_value_id is not null
3261: and jwot.status is null
3262: union all
3263: select terr_qual_id60 terr_qual_id, lay_seq_num
3264: from JTY_WEBADI_OTH_TERR_INTF jwot
3265: WHERE jwot.user_sequence = v_user_sequence
3266: and jwot.action_flag = v_action_flag
3267: and jwot.interface_type = v_intf_type
3268: and jwot.header = v_header
3269: and jwot.qual60_value_id is not null
3270: and jwot.status is null
3271: union all
3272: select terr_qual_id61 terr_qual_id, lay_seq_num
3273: from JTY_WEBADI_OTH_TERR_INTF jwot
3274: WHERE jwot.user_sequence = v_user_sequence
3275: and jwot.action_flag = v_action_flag
3276: and jwot.interface_type = v_intf_type
3277: and jwot.header = v_header
3278: and jwot.qual61_value_id is not null
3279: and jwot.status is null
3280: union all
3281: select terr_qual_id62 terr_qual_id, lay_seq_num
3282: from JTY_WEBADI_OTH_TERR_INTF jwot
3283: WHERE jwot.user_sequence = v_user_sequence
3284: and jwot.action_flag = v_action_flag
3285: and jwot.interface_type = v_intf_type
3286: and jwot.header = v_header
3287: and jwot.qual62_value_id is not null
3288: and jwot.status is null
3289: union all
3290: select terr_qual_id63 terr_qual_id, lay_seq_num
3291: from JTY_WEBADI_OTH_TERR_INTF jwot
3292: WHERE jwot.user_sequence = v_user_sequence
3293: and jwot.action_flag = v_action_flag
3294: and jwot.interface_type = v_intf_type
3295: and jwot.header = v_header
3296: and jwot.qual63_value_id is not null
3297: and jwot.status is null
3298: union all
3299: select terr_qual_id64 terr_qual_id, lay_seq_num
3300: from JTY_WEBADI_OTH_TERR_INTF jwot
3301: WHERE jwot.user_sequence = v_user_sequence
3302: and jwot.action_flag = v_action_flag
3303: and jwot.interface_type = v_intf_type
3304: and jwot.header = v_header
3305: and jwot.qual64_value_id is not null
3306: and jwot.status is null
3307: union all
3308: select terr_qual_id65 terr_qual_id, lay_seq_num
3309: from JTY_WEBADI_OTH_TERR_INTF jwot
3310: WHERE jwot.user_sequence = v_user_sequence
3311: and jwot.action_flag = v_action_flag
3312: and jwot.interface_type = v_intf_type
3313: and jwot.header = v_header
3314: and jwot.qual65_value_id is not null
3315: and jwot.status is null
3316: union all
3317: select terr_qual_id66 terr_qual_id, lay_seq_num
3318: from JTY_WEBADI_OTH_TERR_INTF jwot
3319: WHERE jwot.user_sequence = v_user_sequence
3320: and jwot.action_flag = v_action_flag
3321: and jwot.interface_type = v_intf_type
3322: and jwot.header = v_header
3323: and jwot.qual66_value_id is not null
3324: and jwot.status is null
3325: union all
3326: select terr_qual_id67 terr_qual_id, lay_seq_num
3327: from JTY_WEBADI_OTH_TERR_INTF jwot
3328: WHERE jwot.user_sequence = v_user_sequence
3329: and jwot.action_flag = v_action_flag
3330: and jwot.interface_type = v_intf_type
3331: and jwot.header = v_header
3332: and jwot.qual67_value_id is not null
3333: and jwot.status is null
3334: union all
3335: select terr_qual_id68 terr_qual_id, lay_seq_num
3336: from JTY_WEBADI_OTH_TERR_INTF jwot
3337: WHERE jwot.user_sequence = v_user_sequence
3338: and jwot.action_flag = v_action_flag
3339: and jwot.interface_type = v_intf_type
3340: and jwot.header = v_header
3341: and jwot.qual68_value_id is not null
3342: and jwot.status is null
3343: union all
3344: select terr_qual_id69 terr_qual_id, lay_seq_num
3345: from JTY_WEBADI_OTH_TERR_INTF jwot
3346: WHERE jwot.user_sequence = v_user_sequence
3347: and jwot.action_flag = v_action_flag
3348: and jwot.interface_type = v_intf_type
3349: and jwot.header = v_header
3350: and jwot.qual69_value_id is not null
3351: and jwot.status is null
3352: union all
3353: select terr_qual_id70 terr_qual_id, lay_seq_num
3354: from JTY_WEBADI_OTH_TERR_INTF jwot
3355: WHERE jwot.user_sequence = v_user_sequence
3356: and jwot.action_flag = v_action_flag
3357: and jwot.interface_type = v_intf_type
3358: and jwot.header = v_header
3359: and jwot.qual70_value_id is not null
3360: and jwot.status is null
3361: union all
3362: select terr_qual_id71 terr_qual_id, lay_seq_num
3363: from JTY_WEBADI_OTH_TERR_INTF jwot
3364: WHERE jwot.user_sequence = v_user_sequence
3365: and jwot.action_flag = v_action_flag
3366: and jwot.interface_type = v_intf_type
3367: and jwot.header = v_header
3368: and jwot.qual71_value_id is not null
3369: and jwot.status is null
3370: union all
3371: select terr_qual_id72 terr_qual_id, lay_seq_num
3372: from JTY_WEBADI_OTH_TERR_INTF jwot
3373: WHERE jwot.user_sequence = v_user_sequence
3374: and jwot.action_flag = v_action_flag
3375: and jwot.interface_type = v_intf_type
3376: and jwot.header = v_header
3377: and jwot.qual72_value_id is not null
3378: and jwot.status is null
3379: union all
3380: select terr_qual_id73 terr_qual_id, lay_seq_num
3381: from JTY_WEBADI_OTH_TERR_INTF jwot
3382: WHERE jwot.user_sequence = v_user_sequence
3383: and jwot.action_flag = v_action_flag
3384: and jwot.interface_type = v_intf_type
3385: and jwot.header = v_header
3386: and jwot.qual73_value_id is not null
3387: and jwot.status is null
3388: union all
3389: select terr_qual_id74 terr_qual_id, lay_seq_num
3390: from JTY_WEBADI_OTH_TERR_INTF jwot
3391: WHERE jwot.user_sequence = v_user_sequence
3392: and jwot.action_flag = v_action_flag
3393: and jwot.interface_type = v_intf_type
3394: and jwot.header = v_header
3395: and jwot.qual74_value_id is not null
3396: and jwot.status is null
3397: union all
3398: select terr_qual_id75 terr_qual_id, lay_seq_num
3399: from JTY_WEBADI_OTH_TERR_INTF jwot
3400: WHERE jwot.user_sequence = v_user_sequence
3401: and jwot.action_flag = v_action_flag
3402: and jwot.interface_type = v_intf_type
3403: and jwot.header = v_header
3412: v_header varchar2
3413: ) IS
3414: select sub.qual_value_id, sub.lay_seq_num
3415: from ( select qual1_value_id qual_value_id, lay_seq_num
3416: from JTY_WEBADI_OTH_TERR_INTF jwot
3417: WHERE jwot.user_sequence = v_user_sequence
3418: and jwot.action_flag = v_action_flag
3419: and jwot.interface_type = v_intf_type
3420: and jwot.header = v_header
3421: and jwot.qual1_value_id is not null
3422: and jwot.status is null
3423: union all
3424: select qual2_value_id qual_value_id, lay_seq_num
3425: from JTY_WEBADI_OTH_TERR_INTF jwot
3426: WHERE jwot.user_sequence = v_user_sequence
3427: and jwot.action_flag = v_action_flag
3428: and jwot.interface_type = v_intf_type
3429: and jwot.header = v_header
3430: and jwot.qual2_value_id is not null
3431: and jwot.status is null
3432: union all
3433: select qual3_value_id qual_value_id, lay_seq_num
3434: from JTY_WEBADI_OTH_TERR_INTF jwot
3435: WHERE jwot.user_sequence = v_user_sequence
3436: and jwot.action_flag = v_action_flag
3437: and jwot.interface_type = v_intf_type
3438: and jwot.header = v_header
3439: and jwot.qual3_value_id is not null
3440: and jwot.status is null
3441: union all
3442: select qual4_value_id qual_value_id, lay_seq_num
3443: from JTY_WEBADI_OTH_TERR_INTF jwot
3444: WHERE jwot.user_sequence = v_user_sequence
3445: and jwot.action_flag = v_action_flag
3446: and jwot.interface_type = v_intf_type
3447: and jwot.header = v_header
3448: and jwot.qual4_value_id is not null
3449: and jwot.status is null
3450: union all
3451: select qual5_value_id qual_value_id, lay_seq_num
3452: from JTY_WEBADI_OTH_TERR_INTF jwot
3453: WHERE jwot.user_sequence = v_user_sequence
3454: and jwot.action_flag = v_action_flag
3455: and jwot.interface_type = v_intf_type
3456: and jwot.header = v_header
3457: and jwot.qual5_value_id is not null
3458: and jwot.status is null
3459: union all
3460: select qual6_value_id qual_value_id, lay_seq_num
3461: from JTY_WEBADI_OTH_TERR_INTF jwot
3462: WHERE jwot.user_sequence = v_user_sequence
3463: and jwot.action_flag = v_action_flag
3464: and jwot.interface_type = v_intf_type
3465: and jwot.header = v_header
3466: and jwot.qual6_value_id is not null
3467: and jwot.status is null
3468: union all
3469: select qual7_value_id qual_value_id, lay_seq_num
3470: from JTY_WEBADI_OTH_TERR_INTF jwot
3471: WHERE jwot.user_sequence = v_user_sequence
3472: and jwot.action_flag = v_action_flag
3473: and jwot.interface_type = v_intf_type
3474: and jwot.header = v_header
3475: and jwot.qual7_value_id is not null
3476: and jwot.status is null
3477: union all
3478: select qual8_value_id qual_value_id, lay_seq_num
3479: from JTY_WEBADI_OTH_TERR_INTF jwot
3480: WHERE jwot.user_sequence = v_user_sequence
3481: and jwot.action_flag = v_action_flag
3482: and jwot.interface_type = v_intf_type
3483: and jwot.header = v_header
3484: and jwot.qual8_value_id is not null
3485: and jwot.status is null
3486: union all
3487: select qual9_value_id qual_value_id, lay_seq_num
3488: from JTY_WEBADI_OTH_TERR_INTF jwot
3489: WHERE jwot.user_sequence = v_user_sequence
3490: and jwot.action_flag = v_action_flag
3491: and jwot.interface_type = v_intf_type
3492: and jwot.header = v_header
3493: and jwot.qual9_value_id is not null
3494: and jwot.status is null
3495: union all
3496: select qual10_value_id qual_value_id, lay_seq_num
3497: from JTY_WEBADI_OTH_TERR_INTF jwot
3498: WHERE jwot.user_sequence = v_user_sequence
3499: and jwot.action_flag = v_action_flag
3500: and jwot.interface_type = v_intf_type
3501: and jwot.header = v_header
3502: and jwot.qual10_value_id is not null
3503: and jwot.status is null
3504: union all
3505: select qual11_value_id qual_value_id, lay_seq_num
3506: from JTY_WEBADI_OTH_TERR_INTF jwot
3507: WHERE jwot.user_sequence = v_user_sequence
3508: and jwot.action_flag = v_action_flag
3509: and jwot.interface_type = v_intf_type
3510: and jwot.header = v_header
3511: and jwot.qual11_value_id is not null
3512: and jwot.status is null
3513: union all
3514: select qual12_value_id qual_value_id, lay_seq_num
3515: from JTY_WEBADI_OTH_TERR_INTF jwot
3516: WHERE jwot.user_sequence = v_user_sequence
3517: and jwot.action_flag = v_action_flag
3518: and jwot.interface_type = v_intf_type
3519: and jwot.header = v_header
3520: and jwot.qual12_value_id is not null
3521: and jwot.status is null
3522: union all
3523: select qual13_value_id qual_value_id, lay_seq_num
3524: from JTY_WEBADI_OTH_TERR_INTF jwot
3525: WHERE jwot.user_sequence = v_user_sequence
3526: and jwot.action_flag = v_action_flag
3527: and jwot.interface_type = v_intf_type
3528: and jwot.header = v_header
3529: and jwot.qual13_value_id is not null
3530: and jwot.status is null
3531: union all
3532: select qual14_value_id qual_value_id, lay_seq_num
3533: from JTY_WEBADI_OTH_TERR_INTF jwot
3534: WHERE jwot.user_sequence = v_user_sequence
3535: and jwot.action_flag = v_action_flag
3536: and jwot.interface_type = v_intf_type
3537: and jwot.header = v_header
3538: and jwot.qual14_value_id is not null
3539: and jwot.status is null
3540: union all
3541: select qual15_value_id qual_value_id, lay_seq_num
3542: from JTY_WEBADI_OTH_TERR_INTF jwot
3543: WHERE jwot.user_sequence = v_user_sequence
3544: and jwot.action_flag = v_action_flag
3545: and jwot.interface_type = v_intf_type
3546: and jwot.header = v_header
3547: and jwot.qual15_value_id is not null
3548: and jwot.status is null
3549: union all
3550: select qual16_value_id qual_value_id, lay_seq_num
3551: from JTY_WEBADI_OTH_TERR_INTF jwot
3552: WHERE jwot.user_sequence = v_user_sequence
3553: and jwot.action_flag = v_action_flag
3554: and jwot.interface_type = v_intf_type
3555: and jwot.header = v_header
3556: and jwot.qual16_value_id is not null
3557: and jwot.status is null
3558: union all
3559: select qual17_value_id qual_value_id, lay_seq_num
3560: from JTY_WEBADI_OTH_TERR_INTF jwot
3561: WHERE jwot.user_sequence = v_user_sequence
3562: and jwot.action_flag = v_action_flag
3563: and jwot.interface_type = v_intf_type
3564: and jwot.header = v_header
3565: and jwot.qual17_value_id is not null
3566: and jwot.status is null
3567: union all
3568: select qual18_value_id qual_value_id, lay_seq_num
3569: from JTY_WEBADI_OTH_TERR_INTF jwot
3570: WHERE jwot.user_sequence = v_user_sequence
3571: and jwot.action_flag = v_action_flag
3572: and jwot.interface_type = v_intf_type
3573: and jwot.header = v_header
3574: and jwot.qual18_value_id is not null
3575: and jwot.status is null
3576: union all
3577: select qual19_value_id qual_value_id, lay_seq_num
3578: from JTY_WEBADI_OTH_TERR_INTF jwot
3579: WHERE jwot.user_sequence = v_user_sequence
3580: and jwot.action_flag = v_action_flag
3581: and jwot.interface_type = v_intf_type
3582: and jwot.header = v_header
3583: and jwot.qual19_value_id is not null
3584: and jwot.status is null
3585: union all
3586: select qual20_value_id qual_value_id, lay_seq_num
3587: from JTY_WEBADI_OTH_TERR_INTF jwot
3588: WHERE jwot.user_sequence = v_user_sequence
3589: and jwot.action_flag = v_action_flag
3590: and jwot.interface_type = v_intf_type
3591: and jwot.header = v_header
3592: and jwot.qual20_value_id is not null
3593: and jwot.status is null
3594: union all
3595: select qual21_value_id qual_value_id, lay_seq_num
3596: from JTY_WEBADI_OTH_TERR_INTF jwot
3597: WHERE jwot.user_sequence = v_user_sequence
3598: and jwot.action_flag = v_action_flag
3599: and jwot.interface_type = v_intf_type
3600: and jwot.header = v_header
3601: and jwot.qual21_value_id is not null
3602: and jwot.status is null
3603: union all
3604: select qual22_value_id qual_value_id, lay_seq_num
3605: from JTY_WEBADI_OTH_TERR_INTF jwot
3606: WHERE jwot.user_sequence = v_user_sequence
3607: and jwot.action_flag = v_action_flag
3608: and jwot.interface_type = v_intf_type
3609: and jwot.header = v_header
3610: and jwot.qual22_value_id is not null
3611: and jwot.status is null
3612: union all
3613: select qual23_value_id qual_value_id, lay_seq_num
3614: from JTY_WEBADI_OTH_TERR_INTF jwot
3615: WHERE jwot.user_sequence = v_user_sequence
3616: and jwot.action_flag = v_action_flag
3617: and jwot.interface_type = v_intf_type
3618: and jwot.header = v_header
3619: and jwot.qual23_value_id is not null
3620: and jwot.status is null
3621: union all
3622: select qual24_value_id qual_value_id, lay_seq_num
3623: from JTY_WEBADI_OTH_TERR_INTF jwot
3624: WHERE jwot.user_sequence = v_user_sequence
3625: and jwot.action_flag = v_action_flag
3626: and jwot.interface_type = v_intf_type
3627: and jwot.header = v_header
3628: and jwot.qual24_value_id is not null
3629: and jwot.status is null
3630: union all
3631: select qual25_value_id qual_value_id, lay_seq_num
3632: from JTY_WEBADI_OTH_TERR_INTF jwot
3633: WHERE jwot.user_sequence = v_user_sequence
3634: and jwot.action_flag = v_action_flag
3635: and jwot.interface_type = v_intf_type
3636: and jwot.header = v_header
3637: and jwot.qual25_value_id is not null
3638: and jwot.status is null
3639: union all
3640: select qual26_value_id qual_value_id, lay_seq_num
3641: from JTY_WEBADI_OTH_TERR_INTF jwot
3642: WHERE jwot.user_sequence = v_user_sequence
3643: and jwot.action_flag = v_action_flag
3644: and jwot.interface_type = v_intf_type
3645: and jwot.header = v_header
3646: and jwot.qual26_value_id is not null
3647: and jwot.status is null
3648: union all
3649: select qual27_value_id qual_value_id, lay_seq_num
3650: from JTY_WEBADI_OTH_TERR_INTF jwot
3651: WHERE jwot.user_sequence = v_user_sequence
3652: and jwot.action_flag = v_action_flag
3653: and jwot.interface_type = v_intf_type
3654: and jwot.header = v_header
3655: and jwot.qual27_value_id is not null
3656: and jwot.status is null
3657: union all
3658: select qual28_value_id qual_value_id, lay_seq_num
3659: from JTY_WEBADI_OTH_TERR_INTF jwot
3660: WHERE jwot.user_sequence = v_user_sequence
3661: and jwot.action_flag = v_action_flag
3662: and jwot.interface_type = v_intf_type
3663: and jwot.header = v_header
3664: and jwot.qual28_value_id is not null
3665: and jwot.status is null
3666: union all
3667: select qual29_value_id qual_value_id, lay_seq_num
3668: from JTY_WEBADI_OTH_TERR_INTF jwot
3669: WHERE jwot.user_sequence = v_user_sequence
3670: and jwot.action_flag = v_action_flag
3671: and jwot.interface_type = v_intf_type
3672: and jwot.header = v_header
3674: and jwot.status is null
3675: union all
3676:
3677: select qual30_value_id qual_value_id, lay_seq_num
3678: from JTY_WEBADI_OTH_TERR_INTF jwot
3679: WHERE jwot.user_sequence = v_user_sequence
3680: and jwot.action_flag = v_action_flag
3681: and jwot.interface_type = v_intf_type
3682: and jwot.header = v_header
3683: and jwot.qual30_value_id is not null
3684: and jwot.status is null
3685: union all
3686: select qual31_value_id qual_value_id, lay_seq_num
3687: from JTY_WEBADI_OTH_TERR_INTF jwot
3688: WHERE jwot.user_sequence = v_user_sequence
3689: and jwot.action_flag = v_action_flag
3690: and jwot.interface_type = v_intf_type
3691: and jwot.header = v_header
3692: and jwot.qual31_value_id is not null
3693: and jwot.status is null
3694: union all
3695: select qual32_value_id qual_value_id, lay_seq_num
3696: from JTY_WEBADI_OTH_TERR_INTF jwot
3697: WHERE jwot.user_sequence = v_user_sequence
3698: and jwot.action_flag = v_action_flag
3699: and jwot.interface_type = v_intf_type
3700: and jwot.header = v_header
3701: and jwot.qual32_value_id is not null
3702: and jwot.status is null
3703: union all
3704: select qual33_value_id qual_value_id, lay_seq_num
3705: from JTY_WEBADI_OTH_TERR_INTF jwot
3706: WHERE jwot.user_sequence = v_user_sequence
3707: and jwot.action_flag = v_action_flag
3708: and jwot.interface_type = v_intf_type
3709: and jwot.header = v_header
3710: and jwot.qual33_value_id is not null
3711: and jwot.status is null
3712: union all
3713: select qual34_value_id qual_value_id, lay_seq_num
3714: from JTY_WEBADI_OTH_TERR_INTF jwot
3715: WHERE jwot.user_sequence = v_user_sequence
3716: and jwot.action_flag = v_action_flag
3717: and jwot.interface_type = v_intf_type
3718: and jwot.header = v_header
3719: and jwot.qual34_value_id is not null
3720: and jwot.status is null
3721: union all
3722: select qual35_value_id qual_value_id, lay_seq_num
3723: from JTY_WEBADI_OTH_TERR_INTF jwot
3724: WHERE jwot.user_sequence = v_user_sequence
3725: and jwot.action_flag = v_action_flag
3726: and jwot.interface_type = v_intf_type
3727: and jwot.header = v_header
3728: and jwot.qual35_value_id is not null
3729: and jwot.status is null
3730: union all
3731: select qual36_value_id qual_value_id, lay_seq_num
3732: from JTY_WEBADI_OTH_TERR_INTF jwot
3733: WHERE jwot.user_sequence = v_user_sequence
3734: and jwot.action_flag = v_action_flag
3735: and jwot.interface_type = v_intf_type
3736: and jwot.header = v_header
3737: and jwot.qual36_value_id is not null
3738: and jwot.status is null
3739: union all
3740: select qual37_value_id qual_value_id, lay_seq_num
3741: from JTY_WEBADI_OTH_TERR_INTF jwot
3742: WHERE jwot.user_sequence = v_user_sequence
3743: and jwot.action_flag = v_action_flag
3744: and jwot.interface_type = v_intf_type
3745: and jwot.header = v_header
3746: and jwot.qual37_value_id is not null
3747: and jwot.status is null
3748: union all
3749: select qual38_value_id qual_value_id, lay_seq_num
3750: from JTY_WEBADI_OTH_TERR_INTF jwot
3751: WHERE jwot.user_sequence = v_user_sequence
3752: and jwot.action_flag = v_action_flag
3753: and jwot.interface_type = v_intf_type
3754: and jwot.header = v_header
3755: and jwot.qual38_value_id is not null
3756: and jwot.status is null
3757: union all
3758: select qual39_value_id qual_value_id, lay_seq_num
3759: from JTY_WEBADI_OTH_TERR_INTF jwot
3760: WHERE jwot.user_sequence = v_user_sequence
3761: and jwot.action_flag = v_action_flag
3762: and jwot.interface_type = v_intf_type
3763: and jwot.header = v_header
3765: and jwot.status is null
3766: union all
3767:
3768: select qual40_value_id qual_value_id, lay_seq_num
3769: from JTY_WEBADI_OTH_TERR_INTF jwot
3770: WHERE jwot.user_sequence = v_user_sequence
3771: and jwot.action_flag = v_action_flag
3772: and jwot.interface_type = v_intf_type
3773: and jwot.header = v_header
3774: and jwot.qual40_value_id is not null
3775: and jwot.status is null
3776: union all
3777: select qual41_value_id qual_value_id, lay_seq_num
3778: from JTY_WEBADI_OTH_TERR_INTF jwot
3779: WHERE jwot.user_sequence = v_user_sequence
3780: and jwot.action_flag = v_action_flag
3781: and jwot.interface_type = v_intf_type
3782: and jwot.header = v_header
3783: and jwot.qual41_value_id is not null
3784: and jwot.status is null
3785: union all
3786: select qual42_value_id qual_value_id, lay_seq_num
3787: from JTY_WEBADI_OTH_TERR_INTF jwot
3788: WHERE jwot.user_sequence = v_user_sequence
3789: and jwot.action_flag = v_action_flag
3790: and jwot.interface_type = v_intf_type
3791: and jwot.header = v_header
3792: and jwot.qual42_value_id is not null
3793: and jwot.status is null
3794: union all
3795: select qual43_value_id qual_value_id, lay_seq_num
3796: from JTY_WEBADI_OTH_TERR_INTF jwot
3797: WHERE jwot.user_sequence = v_user_sequence
3798: and jwot.action_flag = v_action_flag
3799: and jwot.interface_type = v_intf_type
3800: and jwot.header = v_header
3801: and jwot.qual43_value_id is not null
3802: and jwot.status is null
3803: union all
3804: select qual44_value_id qual_value_id, lay_seq_num
3805: from JTY_WEBADI_OTH_TERR_INTF jwot
3806: WHERE jwot.user_sequence = v_user_sequence
3807: and jwot.action_flag = v_action_flag
3808: and jwot.interface_type = v_intf_type
3809: and jwot.header = v_header
3810: and jwot.qual44_value_id is not null
3811: and jwot.status is null
3812: union all
3813: select qual45_value_id qual_value_id, lay_seq_num
3814: from JTY_WEBADI_OTH_TERR_INTF jwot
3815: WHERE jwot.user_sequence = v_user_sequence
3816: and jwot.action_flag = v_action_flag
3817: and jwot.interface_type = v_intf_type
3818: and jwot.header = v_header
3819: and jwot.qual45_value_id is not null
3820: and jwot.status is null
3821: union all
3822: select qual46_value_id qual_value_id, lay_seq_num
3823: from JTY_WEBADI_OTH_TERR_INTF jwot
3824: WHERE jwot.user_sequence = v_user_sequence
3825: and jwot.action_flag = v_action_flag
3826: and jwot.interface_type = v_intf_type
3827: and jwot.header = v_header
3828: and jwot.qual46_value_id is not null
3829: and jwot.status is null
3830: union all
3831: select qual47_value_id qual_value_id, lay_seq_num
3832: from JTY_WEBADI_OTH_TERR_INTF jwot
3833: WHERE jwot.user_sequence = v_user_sequence
3834: and jwot.action_flag = v_action_flag
3835: and jwot.interface_type = v_intf_type
3836: and jwot.header = v_header
3837: and jwot.qual47_value_id is not null
3838: and jwot.status is null
3839: union all
3840: select qual48_value_id qual_value_id, lay_seq_num
3841: from JTY_WEBADI_OTH_TERR_INTF jwot
3842: WHERE jwot.user_sequence = v_user_sequence
3843: and jwot.action_flag = v_action_flag
3844: and jwot.interface_type = v_intf_type
3845: and jwot.header = v_header
3846: and jwot.qual48_value_id is not null
3847: and jwot.status is null
3848: union all
3849: select qual49_value_id qual_value_id, lay_seq_num
3850: from JTY_WEBADI_OTH_TERR_INTF jwot
3851: WHERE jwot.user_sequence = v_user_sequence
3852: and jwot.action_flag = v_action_flag
3853: and jwot.interface_type = v_intf_type
3854: and jwot.header = v_header
3856: and jwot.status is null
3857: union all
3858:
3859: select qual50_value_id qual_value_id, lay_seq_num
3860: from JTY_WEBADI_OTH_TERR_INTF jwot
3861: WHERE jwot.user_sequence = v_user_sequence
3862: and jwot.action_flag = v_action_flag
3863: and jwot.interface_type = v_intf_type
3864: and jwot.header = v_header
3865: and jwot.qual50_value_id is not null
3866: and jwot.status is null
3867: union all
3868: select qual51_value_id qual_value_id, lay_seq_num
3869: from JTY_WEBADI_OTH_TERR_INTF jwot
3870: WHERE jwot.user_sequence = v_user_sequence
3871: and jwot.action_flag = v_action_flag
3872: and jwot.interface_type = v_intf_type
3873: and jwot.header = v_header
3874: and jwot.qual51_value_id is not null
3875: and jwot.status is null
3876: union all
3877: select qual52_value_id qual_value_id, lay_seq_num
3878: from JTY_WEBADI_OTH_TERR_INTF jwot
3879: WHERE jwot.user_sequence = v_user_sequence
3880: and jwot.action_flag = v_action_flag
3881: and jwot.interface_type = v_intf_type
3882: and jwot.header = v_header
3883: and jwot.qual52_value_id is not null
3884: and jwot.status is null
3885: union all
3886: select qual53_value_id qual_value_id, lay_seq_num
3887: from JTY_WEBADI_OTH_TERR_INTF jwot
3888: WHERE jwot.user_sequence = v_user_sequence
3889: and jwot.action_flag = v_action_flag
3890: and jwot.interface_type = v_intf_type
3891: and jwot.header = v_header
3892: and jwot.qual53_value_id is not null
3893: and jwot.status is null
3894: union all
3895: select qual54_value_id qual_value_id, lay_seq_num
3896: from JTY_WEBADI_OTH_TERR_INTF jwot
3897: WHERE jwot.user_sequence = v_user_sequence
3898: and jwot.action_flag = v_action_flag
3899: and jwot.interface_type = v_intf_type
3900: and jwot.header = v_header
3901: and jwot.qual54_value_id is not null
3902: and jwot.status is null
3903: union all
3904: select qual55_value_id qual_value_id, lay_seq_num
3905: from JTY_WEBADI_OTH_TERR_INTF jwot
3906: WHERE jwot.user_sequence = v_user_sequence
3907: and jwot.action_flag = v_action_flag
3908: and jwot.interface_type = v_intf_type
3909: and jwot.header = v_header
3910: and jwot.qual55_value_id is not null
3911: and jwot.status is null
3912: union all
3913: select qual56_value_id qual_value_id, lay_seq_num
3914: from JTY_WEBADI_OTH_TERR_INTF jwot
3915: WHERE jwot.user_sequence = v_user_sequence
3916: and jwot.action_flag = v_action_flag
3917: and jwot.interface_type = v_intf_type
3918: and jwot.header = v_header
3919: and jwot.qual56_value_id is not null
3920: and jwot.status is null
3921: union all
3922: select qual57_value_id qual_value_id, lay_seq_num
3923: from JTY_WEBADI_OTH_TERR_INTF jwot
3924: WHERE jwot.user_sequence = v_user_sequence
3925: and jwot.action_flag = v_action_flag
3926: and jwot.interface_type = v_intf_type
3927: and jwot.header = v_header
3928: and jwot.qual57_value_id is not null
3929: and jwot.status is null
3930: union all
3931: select qual58_value_id qual_value_id, lay_seq_num
3932: from JTY_WEBADI_OTH_TERR_INTF jwot
3933: WHERE jwot.user_sequence = v_user_sequence
3934: and jwot.action_flag = v_action_flag
3935: and jwot.interface_type = v_intf_type
3936: and jwot.header = v_header
3937: and jwot.qual58_value_id is not null
3938: and jwot.status is null
3939: union all
3940: select qual59_value_id qual_value_id, lay_seq_num
3941: from JTY_WEBADI_OTH_TERR_INTF jwot
3942: WHERE jwot.user_sequence = v_user_sequence
3943: and jwot.action_flag = v_action_flag
3944: and jwot.interface_type = v_intf_type
3945: and jwot.header = v_header
3947: and jwot.status is null
3948: union all
3949:
3950: select qual60_value_id qual_value_id, lay_seq_num
3951: from JTY_WEBADI_OTH_TERR_INTF jwot
3952: WHERE jwot.user_sequence = v_user_sequence
3953: and jwot.action_flag = v_action_flag
3954: and jwot.interface_type = v_intf_type
3955: and jwot.header = v_header
3956: and jwot.qual60_value_id is not null
3957: and jwot.status is null
3958: union all
3959: select qual61_value_id qual_value_id, lay_seq_num
3960: from JTY_WEBADI_OTH_TERR_INTF jwot
3961: WHERE jwot.user_sequence = v_user_sequence
3962: and jwot.action_flag = v_action_flag
3963: and jwot.interface_type = v_intf_type
3964: and jwot.header = v_header
3965: and jwot.qual61_value_id is not null
3966: and jwot.status is null
3967: union all
3968: select qual62_value_id qual_value_id, lay_seq_num
3969: from JTY_WEBADI_OTH_TERR_INTF jwot
3970: WHERE jwot.user_sequence = v_user_sequence
3971: and jwot.action_flag = v_action_flag
3972: and jwot.interface_type = v_intf_type
3973: and jwot.header = v_header
3974: and jwot.qual62_value_id is not null
3975: and jwot.status is null
3976: union all
3977: select qual63_value_id qual_value_id, lay_seq_num
3978: from JTY_WEBADI_OTH_TERR_INTF jwot
3979: WHERE jwot.user_sequence = v_user_sequence
3980: and jwot.action_flag = v_action_flag
3981: and jwot.interface_type = v_intf_type
3982: and jwot.header = v_header
3983: and jwot.qual63_value_id is not null
3984: and jwot.status is null
3985: union all
3986: select qual64_value_id qual_value_id, lay_seq_num
3987: from JTY_WEBADI_OTH_TERR_INTF jwot
3988: WHERE jwot.user_sequence = v_user_sequence
3989: and jwot.action_flag = v_action_flag
3990: and jwot.interface_type = v_intf_type
3991: and jwot.header = v_header
3992: and jwot.qual64_value_id is not null
3993: and jwot.status is null
3994: union all
3995: select qual65_value_id qual_value_id, lay_seq_num
3996: from JTY_WEBADI_OTH_TERR_INTF jwot
3997: WHERE jwot.user_sequence = v_user_sequence
3998: and jwot.action_flag = v_action_flag
3999: and jwot.interface_type = v_intf_type
4000: and jwot.header = v_header
4001: and jwot.qual65_value_id is not null
4002: and jwot.status is null
4003: union all
4004: select qual66_value_id qual_value_id, lay_seq_num
4005: from JTY_WEBADI_OTH_TERR_INTF jwot
4006: WHERE jwot.user_sequence = v_user_sequence
4007: and jwot.action_flag = v_action_flag
4008: and jwot.interface_type = v_intf_type
4009: and jwot.header = v_header
4010: and jwot.qual66_value_id is not null
4011: and jwot.status is null
4012: union all
4013: select qual67_value_id qual_value_id, lay_seq_num
4014: from JTY_WEBADI_OTH_TERR_INTF jwot
4015: WHERE jwot.user_sequence = v_user_sequence
4016: and jwot.action_flag = v_action_flag
4017: and jwot.interface_type = v_intf_type
4018: and jwot.header = v_header
4019: and jwot.qual67_value_id is not null
4020: and jwot.status is null
4021: union all
4022: select qual68_value_id qual_value_id, lay_seq_num
4023: from JTY_WEBADI_OTH_TERR_INTF jwot
4024: WHERE jwot.user_sequence = v_user_sequence
4025: and jwot.action_flag = v_action_flag
4026: and jwot.interface_type = v_intf_type
4027: and jwot.header = v_header
4028: and jwot.qual68_value_id is not null
4029: and jwot.status is null
4030: union all
4031: select qual69_value_id qual_value_id, lay_seq_num
4032: from JTY_WEBADI_OTH_TERR_INTF jwot
4033: WHERE jwot.user_sequence = v_user_sequence
4034: and jwot.action_flag = v_action_flag
4035: and jwot.interface_type = v_intf_type
4036: and jwot.header = v_header
4038: and jwot.status is null
4039: union all
4040:
4041: select qual70_value_id qual_value_id, lay_seq_num
4042: from JTY_WEBADI_OTH_TERR_INTF jwot
4043: WHERE jwot.user_sequence = v_user_sequence
4044: and jwot.action_flag = v_action_flag
4045: and jwot.interface_type = v_intf_type
4046: and jwot.header = v_header
4047: and jwot.qual70_value_id is not null
4048: and jwot.status is null
4049: union all
4050: select qual71_value_id qual_value_id, lay_seq_num
4051: from JTY_WEBADI_OTH_TERR_INTF jwot
4052: WHERE jwot.user_sequence = v_user_sequence
4053: and jwot.action_flag = v_action_flag
4054: and jwot.interface_type = v_intf_type
4055: and jwot.header = v_header
4056: and jwot.qual71_value_id is not null
4057: and jwot.status is null
4058: union all
4059: select qual72_value_id qual_value_id, lay_seq_num
4060: from JTY_WEBADI_OTH_TERR_INTF jwot
4061: WHERE jwot.user_sequence = v_user_sequence
4062: and jwot.action_flag = v_action_flag
4063: and jwot.interface_type = v_intf_type
4064: and jwot.header = v_header
4065: and jwot.qual72_value_id is not null
4066: and jwot.status is null
4067: union all
4068: select qual73_value_id qual_value_id, lay_seq_num
4069: from JTY_WEBADI_OTH_TERR_INTF jwot
4070: WHERE jwot.user_sequence = v_user_sequence
4071: and jwot.action_flag = v_action_flag
4072: and jwot.interface_type = v_intf_type
4073: and jwot.header = v_header
4074: and jwot.qual73_value_id is not null
4075: and jwot.status is null
4076: union all
4077: select qual74_value_id qual_value_id, lay_seq_num
4078: from JTY_WEBADI_OTH_TERR_INTF jwot
4079: WHERE jwot.user_sequence = v_user_sequence
4080: and jwot.action_flag = v_action_flag
4081: and jwot.interface_type = v_intf_type
4082: and jwot.header = v_header
4083: and jwot.qual74_value_id is not null
4084: and jwot.status is null
4085: union all
4086: select qual75_value_id qual_value_id, lay_seq_num
4087: from JTY_WEBADI_OTH_TERR_INTF jwot
4088: WHERE jwot.user_sequence = v_user_sequence
4089: and jwot.action_flag = v_action_flag
4090: and jwot.interface_type = v_intf_type
4091: and jwot.header = v_header
4099: v_intf_type varchar2,
4100: v_header varchar2
4101: ) IS
4102: SELECT jwr.TERR_RSC_ID, jwot.lay_seq_num
4103: FROM JTY_WEBADI_OTH_TERR_INTF jwot,
4104: JTY_WEBADI_RESOURCES jwr
4105: WHERE jwot.lay_seq_num = jwr.lay_seq_num
4106: and jwot.header = jwr.header
4107: and jwot.user_sequence = jwr.user_sequence
4187: DELETE from JTF_TERR_ALL WHERE TERR_ID = l_del_terr_rec.terr_id(i);
4188:
4189: -- update all records including the qual and rsc which will be deleted
4190: forall i in l_del_terr_rec.terr_id.first..l_del_terr_rec.terr_id.last
4191: update JTY_WEBADI_OTH_TERR_INTF
4192: set status = x_return_status
4193: where terr_id = l_del_terr_rec.terr_id(i)
4194: and user_sequence = p_user_sequence
4195: and interface_type = p_intf_type;
4201: fnd_message.set_name ('JTF', 'JTY_OTH_TERR_DELETE_TERR');
4202: X_Msg_Data := fnd_message.get();
4203:
4204: forall i in l_del_terr_rec.lay_seq_num.first..l_del_terr_rec.lay_seq_num.last
4205: update JTY_WEBADI_OTH_TERR_INTF
4206: set status = x_return_status,
4207: error_msg = x_msg_data
4208: where lay_seq_num = l_del_terr_rec.lay_seq_num(i)
4209: and user_sequence = p_user_sequence
4234: END IF;
4235: END Loop;
4236:
4237: forall i in l_del_qual_val_rec.lay_seq_num.first..l_del_qual_val_rec.lay_seq_num.last
4238: update JTY_WEBADI_OTH_TERR_INTF
4239: set status = x_return_status
4240: where lay_seq_num = l_del_qual_val_rec.lay_seq_num(i)
4241: and user_sequence = p_user_sequence
4242: and action_flag = p_action_flag
4250: fnd_message.set_name ('JTF', 'JTY_OTH_TERR_DELETE_QUAL');
4251: X_Msg_Data := fnd_message.get();
4252:
4253: forall i in l_del_qual_val_rec.lay_seq_num.first..l_del_qual_val_rec.lay_seq_num.last
4254: update JTY_WEBADI_OTH_TERR_INTF
4255: set status = x_return_status,
4256: error_msg = x_msg_data
4257: where lay_seq_num = l_del_qual_val_rec.lay_seq_num(i)
4258: and user_sequence = p_user_sequence
4281: DELETE FROM JTF_TERR_RSC_ALL
4282: WHERE TERR_RSC_ID = l_del_rsc_rec.terr_rsc_id(i);
4283:
4284: forall i in l_del_rsc_rec.lay_seq_num.first..l_del_rsc_rec.lay_seq_num.last
4285: update JTY_WEBADI_OTH_TERR_INTF
4286: set status = x_return_status
4287: where lay_seq_num = l_del_rsc_rec.lay_seq_num(i)
4288: and user_sequence = p_user_sequence
4289: and action_flag = p_action_flag
4297: fnd_message.set_name ('JTF', 'JTY_OTH_TERR_DELETE_RSC');
4298: X_Msg_Data := fnd_message.get();
4299:
4300: forall i in l_del_rsc_rec.lay_seq_num.first..l_del_rsc_rec.lay_seq_num.last
4301: update JTY_WEBADI_OTH_TERR_INTF
4302: set status = x_return_status,
4303: error_msg = x_msg_data
4304: where lay_seq_num = l_del_rsc_rec.lay_seq_num(i)
4305: and user_sequence = p_user_sequence
4747: NUM_WINNERS,
4748: 0 NUM_QUAL,
4749: lay_seq_num
4750: , trim(HIERARCHY) terr_hierarchy
4751: from JTY_WEBADI_OTH_TERR_INTF
4752: where header = v_header
4753: and status is null
4754: and USER_SEQUENCE = v_USER_SEQUENCE
4755: and INTERFACE_TYPE = v_intf_type
4872: END IF;
4873: END LOOP;
4874:
4875: forall i in l_terr_all_rec.TERR_ID.first..l_terr_all_rec.TERR_ID.last
4876: update JTY_WEBADI_OTH_TERR_INTF
4877: set parent_terr_id = l_terr_all_rec.terr_id(i)
4878: where parent_terr_name = l_terr_all_rec.name(i)
4879: and USER_SEQUENCE = P_USER_SEQUENCE
4880: and interface_type = l_intf_type
4880: and interface_type = l_intf_type
4881: and parent_terr_id is null;
4882:
4883: forall i in l_terr_all_rec.TERR_ID.first..l_terr_all_rec.TERR_ID.last
4884: update JTY_WEBADI_OTH_TERR_INTF
4885: set terr_id = l_terr_all_rec.terr_id(i)
4886: where terr_name = l_terr_all_rec.name(i)
4887: and USER_SEQUENCE = P_USER_SEQUENCE
4888: and interface_type = l_intf_type
4908: LAST_UPDATE_LOGIN,
4909: TERR_ID,
4910: usage_id SOURCE_ID,
4911: ORG_ID
4912: from JTY_WEBADI_OTH_TERR_INTF
4913: where header = l_header
4914: and status is null
4915: and USER_SEQUENCE = p_USER_SEQUENCE
4916: and INTERFACE_TYPE = l_intf_type
4937: TERR_ID,
4938: QUAL_TYPE_ID QUAL_TYPE_USG_ID,
4939: ORG_ID
4940: from JTY_WEBADI_QUAL_TYPE_HEADER gt,
4941: JTY_WEBADI_OTH_TERR_INTF jut
4942: where jut.header = L_header
4943: and jut.status is null
4944: and jut.USER_SEQUENCE = P_USER_SEQUENCE
4945: and jut.INTERFACE_TYPE = l_intf_type
4946: and jut.action_flag = p_action_flag
4947: and gt.user_sequence = jut.user_sequence;
4948:
4949: forall i in l_terr_all_rec.lay_seq_num.first..l_terr_all_rec.lay_seq_num.last
4950: update JTY_WEBADI_OTH_TERR_INTF
4951: set status = x_return_status
4952: , error_msg = X_Msg_Data
4953: where lay_seq_num = l_terr_all_rec.lay_seq_num(i)
4954: and interface_type = l_intf_type
4994: NUM_WINNERS = l_terr_all_rec.NUM_WINNERS(i)
4995: where terr_id = l_terr_all_rec.Terr_Id(i);
4996:
4997: forall i in l_terr_all_rec.lay_seq_num.first..l_terr_all_rec.lay_seq_num.last
4998: update JTY_WEBADI_OTH_TERR_INTF
4999: set status = x_return_status
5000: , error_msg = X_Msg_Data
5001: where lay_seq_num = l_terr_all_rec.lay_seq_num(i)
5002: and interface_type = l_intf_type
5012: fnd_message.set_name ('JTF', 'JTY_OTH_TERR_CREATE_TERR');
5013: X_Msg_Data := fnd_message.get();
5014: debugmsg (X_Msg_Data || SQLERRM);
5015:
5016: update JTY_WEBADI_OTH_TERR_INTF jwot
5017: set status = x_return_status,
5018: error_msg = X_Msg_Data
5019: where jwot.USER_SEQUENCE = p_user_sequence
5020: and jwot.header = l_header
5057: QUAL1_VALUE2 qual_VALUE2,
5058: QUAL1_VALUE3 qual_VALUE3, ORG_ID,
5059: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5060: CREATED_BY, CREATION_DATE
5061: FROM JTY_WEBADI_OTH_TERR_INTF jut
5062: where jut.USER_SEQUENCE = v_user_sequence
5063: and jut.status is null
5064: and jut.terr_qual_id1 is null
5065: and jut.qual1_value1 is not null
5073: QUAL2_VALUE2 qual_VALUE2,
5074: QUAL2_VALUE3 qual_VALUE3, ORG_ID,
5075: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5076: CREATED_BY, CREATION_DATE
5077: FROM JTY_WEBADI_OTH_TERR_INTF jut
5078: where jut.USER_SEQUENCE = v_user_sequence
5079: and jut.status is null
5080: and jut.terr_qual_id2 is null
5081: and jut.qual2_value1 is not null
5089: QUAL3_VALUE2 qual_VALUE2,
5090: QUAL3_VALUE3 qual_VALUE3, ORG_ID,
5091: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5092: CREATED_BY, CREATION_DATE
5093: FROM JTY_WEBADI_OTH_TERR_INTF jut
5094: where jut.USER_SEQUENCE = v_user_sequence
5095: and jut.status is null
5096: and jut.terr_qual_id3 is null
5097: and jut.qual3_value1 is not null
5105: QUAL4_VALUE2 qual_VALUE2,
5106: QUAL4_VALUE3 qual_VALUE3, ORG_ID,
5107: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5108: CREATED_BY, CREATION_DATE
5109: FROM JTY_WEBADI_OTH_TERR_INTF jut
5110: where jut.USER_SEQUENCE = v_user_sequence
5111: and jut.status is null
5112: and jut.terr_qual_id4 is null
5113: and jut.qual4_value1 is not null
5121: QUAL5_VALUE2 qual_VALUE2,
5122: QUAL5_VALUE3 qual_VALUE3, ORG_ID,
5123: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5124: CREATED_BY, CREATION_DATE
5125: FROM JTY_WEBADI_OTH_TERR_INTF jut
5126: where jut.USER_SEQUENCE = v_user_sequence
5127: and jut.status is null
5128: and jut.terr_qual_id5 is null
5129: and jut.qual5_value1 is not null
5137: QUAL6_VALUE2 qual_VALUE2,
5138: QUAL6_VALUE3 qual_VALUE3, ORG_ID,
5139: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5140: CREATED_BY, CREATION_DATE
5141: FROM JTY_WEBADI_OTH_TERR_INTF jut
5142: where jut.USER_SEQUENCE = v_user_sequence
5143: and jut.status is null
5144: and jut.terr_qual_id6 is null
5145: and jut.qual6_value1 is not null
5153: QUAL7_VALUE2 qual_VALUE2,
5154: QUAL7_VALUE3 qual_VALUE3, ORG_ID,
5155: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5156: CREATED_BY, CREATION_DATE
5157: FROM JTY_WEBADI_OTH_TERR_INTF jut
5158: where jut.USER_SEQUENCE = v_user_sequence
5159: and jut.status is null
5160: and jut.terr_qual_id7 is null
5161: and jut.qual7_value1 is not null
5169: QUAL8_VALUE2 qual_VALUE2,
5170: QUAL8_VALUE3 qual_VALUE3, ORG_ID,
5171: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5172: CREATED_BY, CREATION_DATE
5173: FROM JTY_WEBADI_OTH_TERR_INTF jut
5174: where jut.USER_SEQUENCE = v_user_sequence
5175: and jut.status is null
5176: and jut.terr_qual_id8 is null
5177: and jut.qual8_value1 is not null
5185: QUAL9_VALUE2 qual_VALUE2,
5186: QUAL9_VALUE3 qual_VALUE3, ORG_ID,
5187: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5188: CREATED_BY, CREATION_DATE
5189: FROM JTY_WEBADI_OTH_TERR_INTF jut
5190: where jut.USER_SEQUENCE = v_user_sequence
5191: and jut.status is null
5192: and jut.terr_qual_id9 is null
5193: and jut.qual9_value1 is not null
5201: QUAL10_VALUE2 qual_VALUE2,
5202: QUAL10_VALUE3 qual_VALUE3, ORG_ID,
5203: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5204: CREATED_BY, CREATION_DATE
5205: FROM JTY_WEBADI_OTH_TERR_INTF jut
5206: where jut.USER_SEQUENCE = v_user_sequence
5207: and jut.status is null
5208: and jut.terr_qual_id10 is null
5209: and jut.qual10_value1 is not null
5217: QUAL11_VALUE2 qual_VALUE2,
5218: QUAL11_VALUE3 qual_VALUE3, ORG_ID,
5219: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5220: CREATED_BY, CREATION_DATE
5221: FROM JTY_WEBADI_OTH_TERR_INTF jut
5222: where jut.USER_SEQUENCE = v_user_sequence
5223: and jut.status is null
5224: and jut.terr_qual_id11 is null
5225: and jut.qual11_value1 is not null
5233: QUAL12_VALUE2 qual_VALUE2,
5234: QUAL12_VALUE3 qual_VALUE3, ORG_ID,
5235: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5236: CREATED_BY, CREATION_DATE
5237: FROM JTY_WEBADI_OTH_TERR_INTF jut
5238: where jut.USER_SEQUENCE = v_user_sequence
5239: and jut.status is null
5240: and jut.terr_qual_id12 is null
5241: and jut.qual12_value1 is not null
5249: QUAL13_VALUE2 qual_VALUE2,
5250: QUAL13_VALUE3 qual_VALUE3, ORG_ID,
5251: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5252: CREATED_BY, CREATION_DATE
5253: FROM JTY_WEBADI_OTH_TERR_INTF jut
5254: where jut.USER_SEQUENCE = v_user_sequence
5255: and jut.status is null
5256: and jut.terr_qual_id13 is null
5257: and jut.qual13_value1 is not null
5265: QUAL14_VALUE2 qual_VALUE2,
5266: QUAL14_VALUE3 qual_VALUE3, ORG_ID,
5267: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5268: CREATED_BY, CREATION_DATE
5269: FROM JTY_WEBADI_OTH_TERR_INTF jut
5270: where jut.USER_SEQUENCE = v_user_sequence
5271: and jut.status is null
5272: and jut.terr_qual_id14 is null
5273: and jut.qual14_value1 is not null
5281: QUAL15_VALUE2 qual_VALUE2,
5282: QUAL15_VALUE3 qual_VALUE3, ORG_ID,
5283: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5284: CREATED_BY, CREATION_DATE
5285: FROM JTY_WEBADI_OTH_TERR_INTF jut
5286: where jut.USER_SEQUENCE = v_user_sequence
5287: and jut.status is null
5288: and jut.terr_qual_id15 is null
5289: and jut.qual15_value1 is not null
5297: QUAL16_VALUE2 qual_VALUE2,
5298: QUAL16_VALUE3 qual_VALUE3, ORG_ID,
5299: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5300: CREATED_BY, CREATION_DATE
5301: FROM JTY_WEBADI_OTH_TERR_INTF jut
5302: where jut.USER_SEQUENCE = v_user_sequence
5303: and jut.status is null
5304: and jut.terr_qual_id16 is null
5305: and jut.qual16_value1 is not null
5313: QUAL17_VALUE2 qual_VALUE2,
5314: QUAL17_VALUE3 qual_VALUE3, ORG_ID,
5315: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5316: CREATED_BY, CREATION_DATE
5317: FROM JTY_WEBADI_OTH_TERR_INTF jut
5318: where jut.USER_SEQUENCE = v_user_sequence
5319: and jut.status is null
5320: and jut.terr_qual_id17 is null
5321: and jut.qual17_value1 is not null
5329: QUAL18_VALUE2 qual_VALUE2,
5330: QUAL18_VALUE3 qual_VALUE3, ORG_ID,
5331: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5332: CREATED_BY, CREATION_DATE
5333: FROM JTY_WEBADI_OTH_TERR_INTF jut
5334: where jut.USER_SEQUENCE = v_user_sequence
5335: and jut.status is null
5336: and jut.terr_qual_id18 is null
5337: and jut.qual18_value1 is not null
5345: QUAL19_VALUE2 qual_VALUE2,
5346: QUAL19_VALUE3 qual_VALUE3, ORG_ID,
5347: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5348: CREATED_BY, CREATION_DATE
5349: FROM JTY_WEBADI_OTH_TERR_INTF jut
5350: where jut.USER_SEQUENCE = v_user_sequence
5351: and jut.status is null
5352: and jut.terr_qual_id19 is null
5353: and jut.qual19_value1 is not null
5361: QUAL20_VALUE2 qual_VALUE2,
5362: QUAL20_VALUE3 qual_VALUE3, ORG_ID,
5363: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5364: CREATED_BY, CREATION_DATE
5365: FROM JTY_WEBADI_OTH_TERR_INTF jut
5366: where jut.USER_SEQUENCE = v_user_sequence
5367: and jut.status is null
5368: and jut.terr_qual_id20 is null
5369: and jut.qual20_value1 is not null
5377: QUAL21_VALUE2 qual_VALUE2,
5378: QUAL21_VALUE3 qual_VALUE3, ORG_ID,
5379: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5380: CREATED_BY, CREATION_DATE
5381: FROM JTY_WEBADI_OTH_TERR_INTF jut
5382: where jut.USER_SEQUENCE = v_user_sequence
5383: and jut.status is null
5384: and jut.terr_qual_id21 is null
5385: and jut.qual21_value1 is not null
5393: QUAL22_VALUE2 qual_VALUE2,
5394: QUAL22_VALUE3 qual_VALUE3, ORG_ID,
5395: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5396: CREATED_BY, CREATION_DATE
5397: FROM JTY_WEBADI_OTH_TERR_INTF jut
5398: where jut.USER_SEQUENCE = v_user_sequence
5399: and jut.status is null
5400: and jut.terr_qual_id22 is null
5401: and jut.qual22_value1 is not null
5409: QUAL23_VALUE2 qual_VALUE2,
5410: QUAL23_VALUE3 qual_VALUE3, ORG_ID,
5411: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5412: CREATED_BY, CREATION_DATE
5413: FROM JTY_WEBADI_OTH_TERR_INTF jut
5414: where jut.USER_SEQUENCE = v_user_sequence
5415: and jut.status is null
5416: and jut.terr_qual_id23 is null
5417: and jut.qual23_value1 is not null
5425: QUAL24_VALUE2 qual_VALUE2,
5426: QUAL24_VALUE3 qual_VALUE3, ORG_ID,
5427: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5428: CREATED_BY, CREATION_DATE
5429: FROM JTY_WEBADI_OTH_TERR_INTF jut
5430: where jut.USER_SEQUENCE = v_user_sequence
5431: and jut.status is null
5432: and jut.terr_qual_id24 is null
5433: and jut.qual24_value1 is not null
5441: QUAL25_VALUE2 qual_valUE2,
5442: QUAL25_VALUE3 qual_valUE3, ORG_ID,
5443: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5444: CREATED_BY, CREATION_DATE
5445: FROM JTY_WEBADI_OTH_TERR_INTF jut
5446: where jut.USER_SEQUENCE = v_user_sequence
5447: and jut.status is null
5448: and jut.terr_qual_id25 is null
5449: and jut.qual25_value1 is not null
5457: QUAL26_VALUE2 qual_VALUE2,
5458: QUAL26_VALUE3 qual_VALUE3, ORG_ID,
5459: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5460: CREATED_BY, CREATION_DATE
5461: FROM JTY_WEBADI_OTH_TERR_INTF jut
5462: where jut.USER_SEQUENCE = v_user_sequence
5463: and jut.status is null
5464: and jut.terr_qual_id26 is null
5465: and jut.qual26_value1 is not null
5473: QUAL27_VALUE2 qual_VALUE2,
5474: QUAL27_VALUE3 qual_VALUE3, ORG_ID,
5475: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5476: CREATED_BY, CREATION_DATE
5477: FROM JTY_WEBADI_OTH_TERR_INTF jut
5478: where jut.USER_SEQUENCE = v_user_sequence
5479: and jut.status is null
5480: and jut.terr_qual_id27 is null
5481: and jut.qual27_value1 is not null
5489: QUAL28_VALUE2 qual_VALUE2,
5490: QUAL28_VALUE3 qual_VALUE3, ORG_ID,
5491: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5492: CREATED_BY, CREATION_DATE
5493: FROM JTY_WEBADI_OTH_TERR_INTF jut
5494: where jut.USER_SEQUENCE = v_user_sequence
5495: and jut.status is null
5496: and jut.terr_qual_id28 is null
5497: and jut.qual28_value1 is not null
5505: QUAL29_VALUE2 qual_VALUE2,
5506: QUAL29_VALUE3 qual_VALUE3, ORG_ID,
5507: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5508: CREATED_BY, CREATION_DATE
5509: FROM JTY_WEBADI_OTH_TERR_INTF jut
5510: where jut.USER_SEQUENCE = v_user_sequence
5511: and jut.status is null
5512: and jut.terr_qual_id29 is null
5513: and jut.qual29_value1 is not null
5521: QUAL30_VALUE2 qual_VALUE2,
5522: QUAL30_VALUE3 qual_VALUE3, ORG_ID,
5523: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5524: CREATED_BY, CREATION_DATE
5525: FROM JTY_WEBADI_OTH_TERR_INTF jut
5526: where jut.USER_SEQUENCE = v_user_sequence
5527: and jut.status is null
5528: and jut.terr_qual_id30 is null
5529: and jut.QUAL30_value1 is not null
5537: QUAL31_VALUE2 qual_VALUE2,
5538: QUAL31_VALUE3 qual_VALUE3, ORG_ID,
5539: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5540: CREATED_BY, CREATION_DATE
5541: FROM JTY_WEBADI_OTH_TERR_INTF jut
5542: where jut.USER_SEQUENCE = v_user_sequence
5543: and jut.status is null
5544: and jut.terr_qual_id31 is null
5545: and jut.QUAL31_value1 is not null
5553: QUAL32_VALUE2 qual_VALUE2,
5554: QUAL32_VALUE3 qual_VALUE3, ORG_ID,
5555: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5556: CREATED_BY, CREATION_DATE
5557: FROM JTY_WEBADI_OTH_TERR_INTF jut
5558: where jut.USER_SEQUENCE = v_user_sequence
5559: and jut.status is null
5560: and jut.terr_qual_id32 is null
5561: and jut.QUAL32_value1 is not null
5569: QUAL33_VALUE2 qual_VALUE2,
5570: QUAL33_VALUE3 qual_VALUE3, ORG_ID,
5571: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5572: CREATED_BY, CREATION_DATE
5573: FROM JTY_WEBADI_OTH_TERR_INTF jut
5574: where jut.USER_SEQUENCE = v_user_sequence
5575: and jut.status is null
5576: and jut.terr_qual_id33 is null
5577: and jut.QUAL33_value1 is not null
5585: QUAL34_VALUE2 qual_VALUE2,
5586: QUAL34_VALUE3 qual_VALUE3, ORG_ID,
5587: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5588: CREATED_BY, CREATION_DATE
5589: FROM JTY_WEBADI_OTH_TERR_INTF jut
5590: where jut.USER_SEQUENCE = v_user_sequence
5591: and jut.status is null
5592: and jut.terr_qual_id34 is null
5593: and jut.QUAL34_value1 is not null
5601: QUAL35_VALUE2 qual_valUE2,
5602: QUAL35_VALUE3 qual_valUE3, ORG_ID,
5603: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5604: CREATED_BY, CREATION_DATE
5605: FROM JTY_WEBADI_OTH_TERR_INTF jut
5606: where jut.USER_SEQUENCE = v_user_sequence
5607: and jut.status is null
5608: and jut.terr_qual_id35 is null
5609: and jut.QUAL35_value1 is not null
5617: QUAL36_VALUE2 qual_VALUE2,
5618: QUAL36_VALUE3 qual_VALUE3, ORG_ID,
5619: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5620: CREATED_BY, CREATION_DATE
5621: FROM JTY_WEBADI_OTH_TERR_INTF jut
5622: where jut.USER_SEQUENCE = v_user_sequence
5623: and jut.status is null
5624: and jut.terr_qual_id36 is null
5625: and jut.QUAL36_value1 is not null
5633: QUAL37_VALUE2 qual_VALUE2,
5634: QUAL37_VALUE3 qual_VALUE3, ORG_ID,
5635: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5636: CREATED_BY, CREATION_DATE
5637: FROM JTY_WEBADI_OTH_TERR_INTF jut
5638: where jut.USER_SEQUENCE = v_user_sequence
5639: and jut.status is null
5640: and jut.terr_qual_id37 is null
5641: and jut.QUAL37_value1 is not null
5649: QUAL38_VALUE2 qual_VALUE2,
5650: QUAL38_VALUE3 qual_VALUE3, ORG_ID,
5651: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5652: CREATED_BY, CREATION_DATE
5653: FROM JTY_WEBADI_OTH_TERR_INTF jut
5654: where jut.USER_SEQUENCE = v_user_sequence
5655: and jut.status is null
5656: and jut.terr_qual_id38 is null
5657: and jut.QUAL38_value1 is not null
5665: QUAL39_VALUE2 qual_VALUE2,
5666: QUAL39_VALUE3 qual_VALUE3, ORG_ID,
5667: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5668: CREATED_BY, CREATION_DATE
5669: FROM JTY_WEBADI_OTH_TERR_INTF jut
5670: where jut.USER_SEQUENCE = v_user_sequence
5671: and jut.status is null
5672: and jut.terr_qual_id39 is null
5673: and jut.QUAL39_value1 is not null
5681: QUAL40_VALUE2 qual_VALUE2,
5682: QUAL40_VALUE3 qual_VALUE3, ORG_ID,
5683: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5684: CREATED_BY, CREATION_DATE
5685: FROM JTY_WEBADI_OTH_TERR_INTF jut
5686: where jut.USER_SEQUENCE = v_user_sequence
5687: and jut.status is null
5688: and jut.terr_qual_id40 is null
5689: and jut.QUAL40_value1 is not null
5697: QUAL41_VALUE2 qual_VALUE2,
5698: QUAL41_VALUE3 qual_VALUE3, ORG_ID,
5699: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5700: CREATED_BY, CREATION_DATE
5701: FROM JTY_WEBADI_OTH_TERR_INTF jut
5702: where jut.USER_SEQUENCE = v_user_sequence
5703: and jut.status is null
5704: and jut.terr_qual_id41 is null
5705: and jut.QUAL41_value1 is not null
5713: QUAL42_VALUE2 qual_VALUE2,
5714: QUAL42_VALUE3 qual_VALUE3, ORG_ID,
5715: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5716: CREATED_BY, CREATION_DATE
5717: FROM JTY_WEBADI_OTH_TERR_INTF jut
5718: where jut.USER_SEQUENCE = v_user_sequence
5719: and jut.status is null
5720: and jut.terr_qual_id42 is null
5721: and jut.QUAL42_value1 is not null
5729: QUAL43_VALUE2 qual_VALUE2,
5730: QUAL43_VALUE3 qual_VALUE3, ORG_ID,
5731: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5732: CREATED_BY, CREATION_DATE
5733: FROM JTY_WEBADI_OTH_TERR_INTF jut
5734: where jut.USER_SEQUENCE = v_user_sequence
5735: and jut.status is null
5736: and jut.terr_qual_id43 is null
5737: and jut.QUAL43_value1 is not null
5745: QUAL44_VALUE2 qual_VALUE2,
5746: QUAL44_VALUE3 qual_VALUE3, ORG_ID,
5747: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5748: CREATED_BY, CREATION_DATE
5749: FROM JTY_WEBADI_OTH_TERR_INTF jut
5750: where jut.USER_SEQUENCE = v_user_sequence
5751: and jut.status is null
5752: and jut.terr_qual_id44 is null
5753: and jut.QUAL44_value1 is not null
5761: QUAL45_VALUE2 qual_valUE2,
5762: QUAL45_VALUE3 qual_valUE3, ORG_ID,
5763: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5764: CREATED_BY, CREATION_DATE
5765: FROM JTY_WEBADI_OTH_TERR_INTF jut
5766: where jut.USER_SEQUENCE = v_user_sequence
5767: and jut.status is null
5768: and jut.terr_qual_id45 is null
5769: and jut.QUAL45_value1 is not null
5777: QUAL46_VALUE2 qual_VALUE2,
5778: QUAL46_VALUE3 qual_VALUE3, ORG_ID,
5779: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5780: CREATED_BY, CREATION_DATE
5781: FROM JTY_WEBADI_OTH_TERR_INTF jut
5782: where jut.USER_SEQUENCE = v_user_sequence
5783: and jut.status is null
5784: and jut.terr_qual_id46 is null
5785: and jut.QUAL46_value1 is not null
5793: QUAL47_VALUE2 qual_VALUE2,
5794: QUAL47_VALUE3 qual_VALUE3, ORG_ID,
5795: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5796: CREATED_BY, CREATION_DATE
5797: FROM JTY_WEBADI_OTH_TERR_INTF jut
5798: where jut.USER_SEQUENCE = v_user_sequence
5799: and jut.status is null
5800: and jut.terr_qual_id47 is null
5801: and jut.QUAL47_value1 is not null
5809: QUAL48_VALUE2 qual_VALUE2,
5810: QUAL48_VALUE3 qual_VALUE3, ORG_ID,
5811: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5812: CREATED_BY, CREATION_DATE
5813: FROM JTY_WEBADI_OTH_TERR_INTF jut
5814: where jut.USER_SEQUENCE = v_user_sequence
5815: and jut.status is null
5816: and jut.terr_qual_id48 is null
5817: and jut.QUAL48_value1 is not null
5825: QUAL49_VALUE2 qual_VALUE2,
5826: QUAL49_VALUE3 qual_VALUE3, ORG_ID,
5827: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5828: CREATED_BY, CREATION_DATE
5829: FROM JTY_WEBADI_OTH_TERR_INTF jut
5830: where jut.USER_SEQUENCE = v_user_sequence
5831: and jut.status is null
5832: and jut.terr_qual_id49 is null
5833: and jut.QUAL49_value1 is not null
5841: QUAL50_VALUE2 qual_VALUE2,
5842: QUAL50_VALUE3 qual_VALUE3, ORG_ID,
5843: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5844: CREATED_BY, CREATION_DATE
5845: FROM JTY_WEBADI_OTH_TERR_INTF jut
5846: where jut.USER_SEQUENCE = v_user_sequence
5847: and jut.status is null
5848: and jut.terr_qual_id50 is null
5849: and jut.QUAL50_value1 is not null
5857: QUAL51_VALUE2 qual_VALUE2,
5858: QUAL51_VALUE3 qual_VALUE3, ORG_ID,
5859: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5860: CREATED_BY, CREATION_DATE
5861: FROM JTY_WEBADI_OTH_TERR_INTF jut
5862: where jut.USER_SEQUENCE = v_user_sequence
5863: and jut.status is null
5864: and jut.terr_qual_id51 is null
5865: and jut.QUAL51_value1 is not null
5873: QUAL52_VALUE2 qual_VALUE2,
5874: QUAL52_VALUE3 qual_VALUE3, ORG_ID,
5875: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5876: CREATED_BY, CREATION_DATE
5877: FROM JTY_WEBADI_OTH_TERR_INTF jut
5878: where jut.USER_SEQUENCE = v_user_sequence
5879: and jut.status is null
5880: and jut.terr_qual_id52 is null
5881: and jut.QUAL52_value1 is not null
5889: QUAL53_VALUE2 qual_VALUE2,
5890: QUAL53_VALUE3 qual_VALUE3, ORG_ID,
5891: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5892: CREATED_BY, CREATION_DATE
5893: FROM JTY_WEBADI_OTH_TERR_INTF jut
5894: where jut.USER_SEQUENCE = v_user_sequence
5895: and jut.status is null
5896: and jut.terr_qual_id53 is null
5897: and jut.QUAL53_value1 is not null
5905: QUAL54_VALUE2 qual_VALUE2,
5906: QUAL54_VALUE3 qual_VALUE3, ORG_ID,
5907: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5908: CREATED_BY, CREATION_DATE
5909: FROM JTY_WEBADI_OTH_TERR_INTF jut
5910: where jut.USER_SEQUENCE = v_user_sequence
5911: and jut.status is null
5912: and jut.terr_qual_id54 is null
5913: and jut.QUAL54_value1 is not null
5921: QUAL55_VALUE2 qual_valUE2,
5922: QUAL55_VALUE3 qual_valUE3, ORG_ID,
5923: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5924: CREATED_BY, CREATION_DATE
5925: FROM JTY_WEBADI_OTH_TERR_INTF jut
5926: where jut.USER_SEQUENCE = v_user_sequence
5927: and jut.status is null
5928: and jut.terr_qual_id55 is null
5929: and jut.QUAL55_value1 is not null
5937: QUAL56_VALUE2 qual_VALUE2,
5938: QUAL56_VALUE3 qual_VALUE3, ORG_ID,
5939: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5940: CREATED_BY, CREATION_DATE
5941: FROM JTY_WEBADI_OTH_TERR_INTF jut
5942: where jut.USER_SEQUENCE = v_user_sequence
5943: and jut.status is null
5944: and jut.terr_qual_id56 is null
5945: and jut.QUAL56_value1 is not null
5953: QUAL57_VALUE2 qual_VALUE2,
5954: QUAL57_VALUE3 qual_VALUE3, ORG_ID,
5955: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5956: CREATED_BY, CREATION_DATE
5957: FROM JTY_WEBADI_OTH_TERR_INTF jut
5958: where jut.USER_SEQUENCE = v_user_sequence
5959: and jut.status is null
5960: and jut.terr_qual_id57 is null
5961: and jut.QUAL57_value1 is not null
5969: QUAL58_VALUE2 qual_VALUE2,
5970: QUAL58_VALUE3 qual_VALUE3, ORG_ID,
5971: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5972: CREATED_BY, CREATION_DATE
5973: FROM JTY_WEBADI_OTH_TERR_INTF jut
5974: where jut.USER_SEQUENCE = v_user_sequence
5975: and jut.status is null
5976: and jut.terr_qual_id58 is null
5977: and jut.QUAL58_value1 is not null
5985: QUAL59_VALUE2 qual_VALUE2,
5986: QUAL59_VALUE3 qual_VALUE3, ORG_ID,
5987: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
5988: CREATED_BY, CREATION_DATE
5989: FROM JTY_WEBADI_OTH_TERR_INTF jut
5990: where jut.USER_SEQUENCE = v_user_sequence
5991: and jut.status is null
5992: and jut.terr_qual_id59 is null
5993: and jut.QUAL59_value1 is not null
6001: QUAL60_VALUE2 qual_VALUE2,
6002: QUAL60_VALUE3 qual_VALUE3, ORG_ID,
6003: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6004: CREATED_BY, CREATION_DATE
6005: FROM JTY_WEBADI_OTH_TERR_INTF jut
6006: where jut.USER_SEQUENCE = v_user_sequence
6007: and jut.status is null
6008: and jut.terr_qual_id60 is null
6009: and jut.QUAL60_value1 is not null
6017: QUAL61_VALUE2 qual_VALUE2,
6018: QUAL61_VALUE3 qual_VALUE3, ORG_ID,
6019: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6020: CREATED_BY, CREATION_DATE
6021: FROM JTY_WEBADI_OTH_TERR_INTF jut
6022: where jut.USER_SEQUENCE = v_user_sequence
6023: and jut.status is null
6024: and jut.terr_qual_id61 is null
6025: and jut.QUAL61_value1 is not null
6033: QUAL62_VALUE2 qual_VALUE2,
6034: QUAL62_VALUE3 qual_VALUE3, ORG_ID,
6035: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6036: CREATED_BY, CREATION_DATE
6037: FROM JTY_WEBADI_OTH_TERR_INTF jut
6038: where jut.USER_SEQUENCE = v_user_sequence
6039: and jut.status is null
6040: and jut.terr_qual_id62 is null
6041: and jut.QUAL62_value1 is not null
6049: QUAL63_VALUE2 qual_VALUE2,
6050: QUAL63_VALUE3 qual_VALUE3, ORG_ID,
6051: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6052: CREATED_BY, CREATION_DATE
6053: FROM JTY_WEBADI_OTH_TERR_INTF jut
6054: where jut.USER_SEQUENCE = v_user_sequence
6055: and jut.status is null
6056: and jut.terr_qual_id63 is null
6057: and jut.QUAL63_value1 is not null
6065: QUAL64_VALUE2 qual_VALUE2,
6066: QUAL64_VALUE3 qual_VALUE3, ORG_ID,
6067: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6068: CREATED_BY, CREATION_DATE
6069: FROM JTY_WEBADI_OTH_TERR_INTF jut
6070: where jut.USER_SEQUENCE = v_user_sequence
6071: and jut.status is null
6072: and jut.terr_qual_id64 is null
6073: and jut.QUAL64_value1 is not null
6081: QUAL65_VALUE2 qual_valUE2,
6082: QUAL65_VALUE3 qual_valUE3, ORG_ID,
6083: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6084: CREATED_BY, CREATION_DATE
6085: FROM JTY_WEBADI_OTH_TERR_INTF jut
6086: where jut.USER_SEQUENCE = v_user_sequence
6087: and jut.status is null
6088: and jut.terr_qual_id65 is null
6089: and jut.QUAL65_value1 is not null
6097: QUAL66_VALUE2 qual_VALUE2,
6098: QUAL66_VALUE3 qual_VALUE3, ORG_ID,
6099: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6100: CREATED_BY, CREATION_DATE
6101: FROM JTY_WEBADI_OTH_TERR_INTF jut
6102: where jut.USER_SEQUENCE = v_user_sequence
6103: and jut.status is null
6104: and jut.terr_qual_id66 is null
6105: and jut.QUAL66_value1 is not null
6113: QUAL67_VALUE2 qual_VALUE2,
6114: QUAL67_VALUE3 qual_VALUE3, ORG_ID,
6115: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6116: CREATED_BY, CREATION_DATE
6117: FROM JTY_WEBADI_OTH_TERR_INTF jut
6118: where jut.USER_SEQUENCE = v_user_sequence
6119: and jut.status is null
6120: and jut.terr_qual_id67 is null
6121: and jut.QUAL67_value1 is not null
6129: QUAL68_VALUE2 qual_VALUE2,
6130: QUAL68_VALUE3 qual_VALUE3, ORG_ID,
6131: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6132: CREATED_BY, CREATION_DATE
6133: FROM JTY_WEBADI_OTH_TERR_INTF jut
6134: where jut.USER_SEQUENCE = v_user_sequence
6135: and jut.status is null
6136: and jut.terr_qual_id68 is null
6137: and jut.QUAL68_value1 is not null
6145: QUAL69_VALUE2 qual_VALUE2,
6146: QUAL69_VALUE3 qual_VALUE3, ORG_ID,
6147: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6148: CREATED_BY, CREATION_DATE
6149: FROM JTY_WEBADI_OTH_TERR_INTF jut
6150: where jut.USER_SEQUENCE = v_user_sequence
6151: and jut.status is null
6152: and jut.terr_qual_id69 is null
6153: and jut.QUAL69_value1 is not null
6161: QUAL70_VALUE2 qual_VALUE2,
6162: QUAL70_VALUE3 qual_VALUE3, ORG_ID,
6163: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6164: CREATED_BY, CREATION_DATE
6165: FROM JTY_WEBADI_OTH_TERR_INTF jut
6166: where jut.USER_SEQUENCE = v_user_sequence
6167: and jut.status is null
6168: and jut.terr_qual_id70 is null
6169: and jut.QUAL70_value1 is not null
6177: QUAL71_VALUE2 qual_VALUE2,
6178: QUAL71_VALUE3 qual_VALUE3, ORG_ID,
6179: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6180: CREATED_BY, CREATION_DATE
6181: FROM JTY_WEBADI_OTH_TERR_INTF jut
6182: where jut.USER_SEQUENCE = v_user_sequence
6183: and jut.status is null
6184: and jut.terr_qual_id71 is null
6185: and jut.QUAL71_value1 is not null
6193: QUAL72_VALUE2 qual_VALUE2,
6194: QUAL72_VALUE3 qual_VALUE3, ORG_ID,
6195: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6196: CREATED_BY, CREATION_DATE
6197: FROM JTY_WEBADI_OTH_TERR_INTF jut
6198: where jut.USER_SEQUENCE = v_user_sequence
6199: and jut.status is null
6200: and jut.terr_qual_id72 is null
6201: and jut.QUAL72_value1 is not null
6209: QUAL73_VALUE2 qual_VALUE2,
6210: QUAL73_VALUE3 qual_VALUE3, ORG_ID,
6211: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6212: CREATED_BY, CREATION_DATE
6213: FROM JTY_WEBADI_OTH_TERR_INTF jut
6214: where jut.USER_SEQUENCE = v_user_sequence
6215: and jut.status is null
6216: and jut.terr_qual_id73 is null
6217: and jut.QUAL73_value1 is not null
6225: QUAL74_VALUE2 qual_VALUE2,
6226: QUAL74_VALUE3 qual_VALUE3, ORG_ID,
6227: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6228: CREATED_BY, CREATION_DATE
6229: FROM JTY_WEBADI_OTH_TERR_INTF jut
6230: where jut.USER_SEQUENCE = v_user_sequence
6231: and jut.status is null
6232: and jut.terr_qual_id74 is null
6233: and jut.QUAL74_value1 is not null
6241: QUAL75_VALUE2 qual_valUE2,
6242: QUAL75_VALUE3 qual_valUE3, ORG_ID,
6243: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6244: CREATED_BY, CREATION_DATE
6245: FROM JTY_WEBADI_OTH_TERR_INTF jut
6246: where jut.USER_SEQUENCE = v_user_sequence
6247: and jut.status is null
6248: and jut.terr_qual_id75 is null
6249: and jut.QUAL75_value1 is not null
6280: QUAL1_VALUE2 qual_VALUE2,
6281: QUAL1_VALUE3 qual_VALUE3, ORG_ID,
6282: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6283: CREATED_BY, CREATION_DATE
6284: FROM JTY_WEBADI_OTH_TERR_INTF jut
6285: where jut.USER_SEQUENCE = v_user_sequence
6286: and jut.status is null
6287: and jut.terr_qual_id1 is not null
6288: and jut.QUAL1_VALUE_ID is null
6297: QUAL2_VALUE2 qual_VALUE2,
6298: QUAL2_VALUE3 qual_VALUE3, ORG_ID,
6299: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6300: CREATED_BY, CREATION_DATE
6301: FROM JTY_WEBADI_OTH_TERR_INTF jut
6302: where jut.USER_SEQUENCE = v_user_sequence
6303: and jut.status is null
6304: and jut.terr_qual_id2 is not null
6305: and jut.QUAL2_VALUE_ID is null
6314: QUAL3_VALUE2 qual_VALUE2,
6315: QUAL3_VALUE3 qual_VALUE3, ORG_ID,
6316: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6317: CREATED_BY, CREATION_DATE
6318: FROM JTY_WEBADI_OTH_TERR_INTF jut
6319: where jut.USER_SEQUENCE = v_user_sequence
6320: and jut.status is null
6321: and jut.terr_qual_id3 is not null
6322: and jut.QUAL3_VALUE_ID is null
6331: QUAL4_VALUE2 qual_VALUE2,
6332: QUAL4_VALUE3 qual_VALUE3, ORG_ID,
6333: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6334: CREATED_BY, CREATION_DATE
6335: FROM JTY_WEBADI_OTH_TERR_INTF jut
6336: where jut.USER_SEQUENCE = v_user_sequence
6337: and jut.status is null
6338: and jut.terr_qual_id4 is not null
6339: and jut.QUAL4_VALUE_ID is null
6348: QUAL5_VALUE2 qual_VALUE2,
6349: QUAL5_VALUE3 qual_VALUE3, ORG_ID,
6350: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6351: CREATED_BY, CREATION_DATE
6352: FROM JTY_WEBADI_OTH_TERR_INTF jut
6353: where jut.USER_SEQUENCE = v_user_sequence
6354: and jut.status is null
6355: and jut.terr_qual_id5 is not null
6356: and jut.QUAL5_VALUE_ID is null
6365: QUAL6_VALUE2 qual_VALUE2,
6366: QUAL6_VALUE3 qual_VALUE3, ORG_ID,
6367: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6368: CREATED_BY, CREATION_DATE
6369: FROM JTY_WEBADI_OTH_TERR_INTF jut
6370: where jut.USER_SEQUENCE = v_user_sequence
6371: and jut.status is null
6372: and jut.terr_qual_id6 is not null
6373: and jut.QUAL6_VALUE_ID is null
6382: QUAL7_VALUE2 qual_VALUE2,
6383: QUAL7_VALUE3 qual_VALUE3, ORG_ID,
6384: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6385: CREATED_BY, CREATION_DATE
6386: FROM JTY_WEBADI_OTH_TERR_INTF jut
6387: where jut.USER_SEQUENCE = v_user_sequence
6388: and jut.status is null
6389: and jut.terr_qual_id7 is not null
6390: and jut.QUAL7_VALUE_ID is null
6399: QUAL8_VALUE2 qual_VALUE2,
6400: QUAL8_VALUE3 qual_VALUE3, ORG_ID,
6401: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6402: CREATED_BY, CREATION_DATE
6403: FROM JTY_WEBADI_OTH_TERR_INTF jut
6404: where jut.USER_SEQUENCE = v_user_sequence
6405: and jut.status is null
6406: and jut.terr_qual_id8 is not null
6407: and jut.QUAL8_VALUE_ID is null
6416: QUAL9_VALUE2 qual_VALUE2,
6417: QUAL9_VALUE3 qual_VALUE3, ORG_ID,
6418: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6419: CREATED_BY, CREATION_DATE
6420: FROM JTY_WEBADI_OTH_TERR_INTF jut
6421: where jut.USER_SEQUENCE = v_user_sequence
6422: and jut.status is null
6423: and jut.terr_qual_id9 is not null
6424: and jut.QUAL9_VALUE_ID is null
6433: QUAL10_VALUE2 qual_VALUE2,
6434: QUAL10_VALUE3 qual_VALUE3, ORG_ID,
6435: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6436: CREATED_BY, CREATION_DATE
6437: FROM JTY_WEBADI_OTH_TERR_INTF jut
6438: where jut.USER_SEQUENCE = v_user_sequence
6439: and jut.status is null
6440: and jut.terr_qual_id10 is not null
6441: and jut.QUAL10_VALUE_ID is null
6450: QUAL11_VALUE2 qual_VALUE2,
6451: QUAL11_VALUE3 qual_VALUE3, ORG_ID,
6452: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6453: CREATED_BY, CREATION_DATE
6454: FROM JTY_WEBADI_OTH_TERR_INTF jut
6455: where jut.USER_SEQUENCE = v_user_sequence
6456: and jut.status is null
6457: and jut.terr_qual_id11 is not null
6458: and jut.QUAL11_VALUE_ID is null
6467: QUAL12_VALUE2 qual_VALUE2,
6468: QUAL12_VALUE3 qual_VALUE3, ORG_ID,
6469: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6470: CREATED_BY, CREATION_DATE
6471: FROM JTY_WEBADI_OTH_TERR_INTF jut
6472: where jut.USER_SEQUENCE = v_user_sequence
6473: and jut.status is null
6474: and jut.terr_qual_id12 is not null
6475: and jut.QUAL12_VALUE_ID is null
6484: QUAL13_VALUE2 qual_VALUE2,
6485: QUAL13_VALUE3 qual_VALUE3, ORG_ID,
6486: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6487: CREATED_BY, CREATION_DATE
6488: FROM JTY_WEBADI_OTH_TERR_INTF jut
6489: where jut.USER_SEQUENCE = v_user_sequence
6490: and jut.status is null
6491: and jut.terr_qual_id13 is not null
6492: and jut.QUAL13_VALUE_ID is null
6501: QUAL14_VALUE2 qual_VALUE2,
6502: QUAL14_VALUE3 qual_VALUE3, ORG_ID,
6503: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6504: CREATED_BY, CREATION_DATE
6505: FROM JTY_WEBADI_OTH_TERR_INTF jut
6506: where jut.USER_SEQUENCE = v_user_sequence
6507: and jut.status is null
6508: and jut.terr_qual_id14 is not null
6509: and jut.QUAL14_VALUE_ID is null
6518: QUAL15_VALUE2 qual_VALUE2,
6519: QUAL15_VALUE3 qual_VALUE3, ORG_ID,
6520: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6521: CREATED_BY, CREATION_DATE
6522: FROM JTY_WEBADI_OTH_TERR_INTF jut
6523: where jut.USER_SEQUENCE = v_user_sequence
6524: and jut.status is null
6525: and jut.terr_qual_id15 is not null
6526: and jut.QUAL15_VALUE_ID is null
6535: QUAL16_VALUE2 qual_VALUE2,
6536: QUAL16_VALUE3 qual_VALUE3, ORG_ID,
6537: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6538: CREATED_BY, CREATION_DATE
6539: FROM JTY_WEBADI_OTH_TERR_INTF jut
6540: where jut.USER_SEQUENCE = v_user_sequence
6541: and jut.status is null
6542: and jut.terr_qual_id16 is not null
6543: and jut.QUAL16_VALUE_ID is null
6552: QUAL17_VALUE2 qual_VALUE2,
6553: QUAL17_VALUE3 qual_VALUE3, ORG_ID,
6554: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6555: CREATED_BY, CREATION_DATE
6556: FROM JTY_WEBADI_OTH_TERR_INTF jut
6557: where jut.USER_SEQUENCE = v_user_sequence
6558: and jut.status is null
6559: and jut.terr_qual_id17 is not null
6560: and jut.QUAL17_VALUE_ID is null
6569: QUAL18_VALUE2 qual_VALUE2,
6570: QUAL18_VALUE3 qual_VALUE3, ORG_ID,
6571: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6572: CREATED_BY, CREATION_DATE
6573: FROM JTY_WEBADI_OTH_TERR_INTF jut
6574: where jut.USER_SEQUENCE = v_user_sequence
6575: and jut.status is null
6576: and jut.terr_qual_id18 is not null
6577: and jut.QUAL18_VALUE_ID is null
6586: QUAL19_VALUE2 qual_VALUE2,
6587: QUAL19_VALUE3 qual_VALUE3, ORG_ID,
6588: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6589: CREATED_BY, CREATION_DATE
6590: FROM JTY_WEBADI_OTH_TERR_INTF jut
6591: where jut.USER_SEQUENCE = v_user_sequence
6592: and jut.status is null
6593: and jut.terr_qual_id19 is not null
6594: and jut.QUAL19_VALUE_ID is null
6603: QUAL20_VALUE2 qual_VALUE2,
6604: QUAL20_VALUE3 qual_VALUE3, ORG_ID,
6605: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6606: CREATED_BY, CREATION_DATE
6607: FROM JTY_WEBADI_OTH_TERR_INTF jut
6608: where jut.USER_SEQUENCE = v_user_sequence
6609: and jut.status is null
6610: and jut.terr_qual_id20 is not null
6611: and jut.QUAL20_VALUE_ID is null
6620: QUAL21_VALUE2 qual_VALUE2,
6621: QUAL21_VALUE3 qual_VALUE3, ORG_ID,
6622: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6623: CREATED_BY, CREATION_DATE
6624: FROM JTY_WEBADI_OTH_TERR_INTF jut
6625: where jut.USER_SEQUENCE = v_user_sequence
6626: and jut.status is null
6627: and jut.terr_qual_id21 is not null
6628: and jut.QUAL21_VALUE_ID is null
6637: QUAL22_VALUE2 qual_VALUE2,
6638: QUAL22_VALUE3 qual_VALUE3, ORG_ID,
6639: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6640: CREATED_BY, CREATION_DATE
6641: FROM JTY_WEBADI_OTH_TERR_INTF jut
6642: where jut.USER_SEQUENCE = v_user_sequence
6643: and jut.status is null
6644: and jut.terr_qual_id22 is not null
6645: and jut.QUAL22_VALUE_ID is null
6654: QUAL23_VALUE2 qual_VALUE2,
6655: QUAL23_VALUE3 qual_VALUE3, ORG_ID,
6656: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6657: CREATED_BY, CREATION_DATE
6658: FROM JTY_WEBADI_OTH_TERR_INTF jut
6659: where jut.USER_SEQUENCE = v_user_sequence
6660: and jut.status is null
6661: and jut.terr_qual_id23 is not null
6662: and jut.QUAL23_VALUE_ID is null
6671: QUAL24_VALUE2 qual_VALUE2,
6672: QUAL24_VALUE3 qual_VALUE3, ORG_ID,
6673: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6674: CREATED_BY, CREATION_DATE
6675: FROM JTY_WEBADI_OTH_TERR_INTF jut
6676: where jut.USER_SEQUENCE = v_user_sequence
6677: and jut.status is null
6678: and jut.terr_qual_id24 is not null
6679: and jut.QUAL24_VALUE_ID is null
6688: QUAL25_VALUE2 qual_valUE2,
6689: QUAL25_VALUE3 qual_valUE3, ORG_ID,
6690: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6691: CREATED_BY, CREATION_DATE
6692: FROM JTY_WEBADI_OTH_TERR_INTF jut
6693: where jut.USER_SEQUENCE = v_user_sequence
6694: and jut.status is null
6695: and jut.terr_qual_id25 is not null
6696: and jut.QUAL25_VALUE_ID is null
6705: QUAL26_VALUE2 qual_VALUE2,
6706: QUAL26_VALUE3 qual_VALUE3, ORG_ID,
6707: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6708: CREATED_BY, CREATION_DATE
6709: FROM JTY_WEBADI_OTH_TERR_INTF jut
6710: where jut.USER_SEQUENCE = v_user_sequence
6711: and jut.status is null
6712: and jut.terr_qual_id26 is not null
6713: and jut.QUAL26_VALUE_ID is null
6722: QUAL27_VALUE2 qual_VALUE2,
6723: QUAL27_VALUE3 qual_VALUE3, ORG_ID,
6724: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6725: CREATED_BY, CREATION_DATE
6726: FROM JTY_WEBADI_OTH_TERR_INTF jut
6727: where jut.USER_SEQUENCE = v_user_sequence
6728: and jut.status is null
6729: and jut.terr_qual_id27 is not null
6730: and jut.QUAL27_VALUE_ID is null
6739: QUAL28_VALUE2 qual_VALUE2,
6740: QUAL28_VALUE3 qual_VALUE3, ORG_ID,
6741: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6742: CREATED_BY, CREATION_DATE
6743: FROM JTY_WEBADI_OTH_TERR_INTF jut
6744: where jut.USER_SEQUENCE = v_user_sequence
6745: and jut.status is null
6746: and jut.terr_qual_id28 is not null
6747: and jut.QUAL28_VALUE_ID is null
6756: QUAL29_VALUE2 qual_VALUE2,
6757: QUAL29_VALUE3 qual_VALUE3, ORG_ID,
6758: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6759: CREATED_BY, CREATION_DATE
6760: FROM JTY_WEBADI_OTH_TERR_INTF jut
6761: where jut.USER_SEQUENCE = v_user_sequence
6762: and jut.status is null
6763: and jut.terr_qual_id29 is not null
6764: and jut.QUAL29_VALUE_ID is null
6773: QUAL30_VALUE2 qual_VALUE2,
6774: QUAL30_VALUE3 qual_VALUE3, ORG_ID,
6775: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6776: CREATED_BY, CREATION_DATE
6777: FROM JTY_WEBADI_OTH_TERR_INTF jut
6778: where jut.USER_SEQUENCE = v_user_sequence
6779: and jut.status is null
6780: and jut.terr_qual_id30 is not null
6781: and jut.QUAL30_VALUE_ID is null
6790: QUAL31_VALUE2 qual_VALUE2,
6791: QUAL31_VALUE3 qual_VALUE3, ORG_ID,
6792: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6793: CREATED_BY, CREATION_DATE
6794: FROM JTY_WEBADI_OTH_TERR_INTF jut
6795: where jut.USER_SEQUENCE = v_user_sequence
6796: and jut.status is null
6797: and jut.terr_qual_id31 is not null
6798: and jut.QUAL31_VALUE_ID is null
6807: QUAL32_VALUE2 qual_VALUE2,
6808: QUAL32_VALUE3 qual_VALUE3, ORG_ID,
6809: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6810: CREATED_BY, CREATION_DATE
6811: FROM JTY_WEBADI_OTH_TERR_INTF jut
6812: where jut.USER_SEQUENCE = v_user_sequence
6813: and jut.status is null
6814: and jut.terr_qual_id32 is not null
6815: and jut.QUAL32_VALUE_ID is null
6824: QUAL33_VALUE2 qual_VALUE2,
6825: QUAL33_VALUE3 qual_VALUE3, ORG_ID,
6826: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6827: CREATED_BY, CREATION_DATE
6828: FROM JTY_WEBADI_OTH_TERR_INTF jut
6829: where jut.USER_SEQUENCE = v_user_sequence
6830: and jut.status is null
6831: and jut.terr_qual_id33 is not null
6832: and jut.QUAL33_VALUE_ID is null
6841: QUAL34_VALUE2 qual_VALUE2,
6842: QUAL34_VALUE3 qual_VALUE3, ORG_ID,
6843: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6844: CREATED_BY, CREATION_DATE
6845: FROM JTY_WEBADI_OTH_TERR_INTF jut
6846: where jut.USER_SEQUENCE = v_user_sequence
6847: and jut.status is null
6848: and jut.terr_qual_id34 is not null
6849: and jut.QUAL34_VALUE_ID is null
6858: QUAL35_VALUE2 qual_valUE2,
6859: QUAL35_VALUE3 qual_valUE3, ORG_ID,
6860: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6861: CREATED_BY, CREATION_DATE
6862: FROM JTY_WEBADI_OTH_TERR_INTF jut
6863: where jut.USER_SEQUENCE = v_user_sequence
6864: and jut.status is null
6865: and jut.terr_qual_id35 is not null
6866: and jut.QUAL35_VALUE_ID is null
6875: QUAL36_VALUE2 qual_VALUE2,
6876: QUAL36_VALUE3 qual_VALUE3, ORG_ID,
6877: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6878: CREATED_BY, CREATION_DATE
6879: FROM JTY_WEBADI_OTH_TERR_INTF jut
6880: where jut.USER_SEQUENCE = v_user_sequence
6881: and jut.status is null
6882: and jut.terr_qual_id36 is not null
6883: and jut.QUAL36_VALUE_ID is null
6892: QUAL37_VALUE2 qual_VALUE2,
6893: QUAL37_VALUE3 qual_VALUE3, ORG_ID,
6894: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6895: CREATED_BY, CREATION_DATE
6896: FROM JTY_WEBADI_OTH_TERR_INTF jut
6897: where jut.USER_SEQUENCE = v_user_sequence
6898: and jut.status is null
6899: and jut.terr_qual_id37 is not null
6900: and jut.QUAL37_VALUE_ID is null
6909: QUAL38_VALUE2 qual_VALUE2,
6910: QUAL38_VALUE3 qual_VALUE3, ORG_ID,
6911: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6912: CREATED_BY, CREATION_DATE
6913: FROM JTY_WEBADI_OTH_TERR_INTF jut
6914: where jut.USER_SEQUENCE = v_user_sequence
6915: and jut.status is null
6916: and jut.terr_qual_id38 is not null
6917: and jut.QUAL38_VALUE_ID is null
6926: QUAL39_VALUE2 qual_VALUE2,
6927: QUAL39_VALUE3 qual_VALUE3, ORG_ID,
6928: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6929: CREATED_BY, CREATION_DATE
6930: FROM JTY_WEBADI_OTH_TERR_INTF jut
6931: where jut.USER_SEQUENCE = v_user_sequence
6932: and jut.status is null
6933: and jut.terr_qual_id39 is not null
6934: and jut.QUAL39_VALUE_ID is null
6943: QUAL40_VALUE2 qual_VALUE2,
6944: QUAL40_VALUE3 qual_VALUE3, ORG_ID,
6945: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6946: CREATED_BY, CREATION_DATE
6947: FROM JTY_WEBADI_OTH_TERR_INTF jut
6948: where jut.USER_SEQUENCE = v_user_sequence
6949: and jut.status is null
6950: and jut.terr_qual_id40 is not null
6951: and jut.QUAL40_VALUE_ID is null
6960: QUAL41_VALUE2 qual_VALUE2,
6961: QUAL41_VALUE3 qual_VALUE3, ORG_ID,
6962: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6963: CREATED_BY, CREATION_DATE
6964: FROM JTY_WEBADI_OTH_TERR_INTF jut
6965: where jut.USER_SEQUENCE = v_user_sequence
6966: and jut.status is null
6967: and jut.terr_qual_id41 is not null
6968: and jut.QUAL41_VALUE_ID is null
6977: QUAL42_VALUE2 qual_VALUE2,
6978: QUAL42_VALUE3 qual_VALUE3, ORG_ID,
6979: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6980: CREATED_BY, CREATION_DATE
6981: FROM JTY_WEBADI_OTH_TERR_INTF jut
6982: where jut.USER_SEQUENCE = v_user_sequence
6983: and jut.status is null
6984: and jut.terr_qual_id42 is not null
6985: and jut.QUAL42_VALUE_ID is null
6994: QUAL43_VALUE2 qual_VALUE2,
6995: QUAL43_VALUE3 qual_VALUE3, ORG_ID,
6996: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
6997: CREATED_BY, CREATION_DATE
6998: FROM JTY_WEBADI_OTH_TERR_INTF jut
6999: where jut.USER_SEQUENCE = v_user_sequence
7000: and jut.status is null
7001: and jut.terr_qual_id43 is not null
7002: and jut.QUAL43_VALUE_ID is null
7011: QUAL44_VALUE2 qual_VALUE2,
7012: QUAL44_VALUE3 qual_VALUE3, ORG_ID,
7013: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7014: CREATED_BY, CREATION_DATE
7015: FROM JTY_WEBADI_OTH_TERR_INTF jut
7016: where jut.USER_SEQUENCE = v_user_sequence
7017: and jut.status is null
7018: and jut.terr_qual_id44 is not null
7019: and jut.QUAL44_VALUE_ID is null
7028: QUAL45_VALUE2 qual_valUE2,
7029: QUAL45_VALUE3 qual_valUE3, ORG_ID,
7030: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7031: CREATED_BY, CREATION_DATE
7032: FROM JTY_WEBADI_OTH_TERR_INTF jut
7033: where jut.USER_SEQUENCE = v_user_sequence
7034: and jut.status is null
7035: and jut.terr_qual_id45 is not null
7036: and jut.QUAL45_VALUE_ID is null
7045: QUAL46_VALUE2 qual_VALUE2,
7046: QUAL46_VALUE3 qual_VALUE3, ORG_ID,
7047: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7048: CREATED_BY, CREATION_DATE
7049: FROM JTY_WEBADI_OTH_TERR_INTF jut
7050: where jut.USER_SEQUENCE = v_user_sequence
7051: and jut.status is null
7052: and jut.terr_qual_id46 is not null
7053: and jut.QUAL46_VALUE_ID is null
7062: QUAL47_VALUE2 qual_VALUE2,
7063: QUAL47_VALUE3 qual_VALUE3, ORG_ID,
7064: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7065: CREATED_BY, CREATION_DATE
7066: FROM JTY_WEBADI_OTH_TERR_INTF jut
7067: where jut.USER_SEQUENCE = v_user_sequence
7068: and jut.status is null
7069: and jut.terr_qual_id47 is not null
7070: and jut.QUAL47_VALUE_ID is null
7079: QUAL48_VALUE2 qual_VALUE2,
7080: QUAL48_VALUE3 qual_VALUE3, ORG_ID,
7081: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7082: CREATED_BY, CREATION_DATE
7083: FROM JTY_WEBADI_OTH_TERR_INTF jut
7084: where jut.USER_SEQUENCE = v_user_sequence
7085: and jut.status is null
7086: and jut.terr_qual_id48 is not null
7087: and jut.QUAL48_VALUE_ID is null
7096: QUAL49_VALUE2 qual_VALUE2,
7097: QUAL49_VALUE3 qual_VALUE3, ORG_ID,
7098: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7099: CREATED_BY, CREATION_DATE
7100: FROM JTY_WEBADI_OTH_TERR_INTF jut
7101: where jut.USER_SEQUENCE = v_user_sequence
7102: and jut.status is null
7103: and jut.terr_qual_id49 is not null
7104: and jut.QUAL49_VALUE_ID is null
7113: QUAL50_VALUE2 qual_VALUE2,
7114: QUAL50_VALUE3 qual_VALUE3, ORG_ID,
7115: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7116: CREATED_BY, CREATION_DATE
7117: FROM JTY_WEBADI_OTH_TERR_INTF jut
7118: where jut.USER_SEQUENCE = v_user_sequence
7119: and jut.status is null
7120: and jut.terr_qual_id50 is not null
7121: and jut.QUAL50_VALUE_ID is null
7130: QUAL51_VALUE2 qual_VALUE2,
7131: QUAL51_VALUE3 qual_VALUE3, ORG_ID,
7132: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7133: CREATED_BY, CREATION_DATE
7134: FROM JTY_WEBADI_OTH_TERR_INTF jut
7135: where jut.USER_SEQUENCE = v_user_sequence
7136: and jut.status is null
7137: and jut.terr_qual_id51 is not null
7138: and jut.QUAL51_VALUE_ID is null
7147: QUAL52_VALUE2 qual_VALUE2,
7148: QUAL52_VALUE3 qual_VALUE3, ORG_ID,
7149: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7150: CREATED_BY, CREATION_DATE
7151: FROM JTY_WEBADI_OTH_TERR_INTF jut
7152: where jut.USER_SEQUENCE = v_user_sequence
7153: and jut.status is null
7154: and jut.terr_qual_id52 is not null
7155: and jut.QUAL52_VALUE_ID is null
7164: QUAL53_VALUE2 qual_VALUE2,
7165: QUAL53_VALUE3 qual_VALUE3, ORG_ID,
7166: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7167: CREATED_BY, CREATION_DATE
7168: FROM JTY_WEBADI_OTH_TERR_INTF jut
7169: where jut.USER_SEQUENCE = v_user_sequence
7170: and jut.status is null
7171: and jut.terr_qual_id53 is not null
7172: and jut.QUAL53_VALUE_ID is null
7181: QUAL54_VALUE2 qual_VALUE2,
7182: QUAL54_VALUE3 qual_VALUE3, ORG_ID,
7183: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7184: CREATED_BY, CREATION_DATE
7185: FROM JTY_WEBADI_OTH_TERR_INTF jut
7186: where jut.USER_SEQUENCE = v_user_sequence
7187: and jut.status is null
7188: and jut.terr_qual_id54 is not null
7189: and jut.QUAL54_VALUE_ID is null
7198: QUAL55_VALUE2 qual_valUE2,
7199: QUAL55_VALUE3 qual_valUE3, ORG_ID,
7200: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7201: CREATED_BY, CREATION_DATE
7202: FROM JTY_WEBADI_OTH_TERR_INTF jut
7203: where jut.USER_SEQUENCE = v_user_sequence
7204: and jut.status is null
7205: and jut.terr_qual_id55 is not null
7206: and jut.QUAL55_VALUE_ID is null
7215: QUAL56_VALUE2 qual_VALUE2,
7216: QUAL56_VALUE3 qual_VALUE3, ORG_ID,
7217: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7218: CREATED_BY, CREATION_DATE
7219: FROM JTY_WEBADI_OTH_TERR_INTF jut
7220: where jut.USER_SEQUENCE = v_user_sequence
7221: and jut.status is null
7222: and jut.terr_qual_id56 is not null
7223: and jut.QUAL56_VALUE_ID is null
7232: QUAL57_VALUE2 qual_VALUE2,
7233: QUAL57_VALUE3 qual_VALUE3, ORG_ID,
7234: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7235: CREATED_BY, CREATION_DATE
7236: FROM JTY_WEBADI_OTH_TERR_INTF jut
7237: where jut.USER_SEQUENCE = v_user_sequence
7238: and jut.status is null
7239: and jut.terr_qual_id57 is not null
7240: and jut.QUAL57_VALUE_ID is null
7249: QUAL58_VALUE2 qual_VALUE2,
7250: QUAL58_VALUE3 qual_VALUE3, ORG_ID,
7251: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7252: CREATED_BY, CREATION_DATE
7253: FROM JTY_WEBADI_OTH_TERR_INTF jut
7254: where jut.USER_SEQUENCE = v_user_sequence
7255: and jut.status is null
7256: and jut.terr_qual_id58 is not null
7257: and jut.QUAL58_VALUE_ID is null
7266: QUAL59_VALUE2 qual_VALUE2,
7267: QUAL59_VALUE3 qual_VALUE3, ORG_ID,
7268: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7269: CREATED_BY, CREATION_DATE
7270: FROM JTY_WEBADI_OTH_TERR_INTF jut
7271: where jut.USER_SEQUENCE = v_user_sequence
7272: and jut.status is null
7273: and jut.terr_qual_id59 is not null
7274: and jut.QUAL59_VALUE_ID is null
7283: QUAL60_VALUE2 qual_VALUE2,
7284: QUAL60_VALUE3 qual_VALUE3, ORG_ID,
7285: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7286: CREATED_BY, CREATION_DATE
7287: FROM JTY_WEBADI_OTH_TERR_INTF jut
7288: where jut.USER_SEQUENCE = v_user_sequence
7289: and jut.status is null
7290: and jut.terr_qual_id60 is not null
7291: and jut.QUAL60_VALUE_ID is null
7300: QUAL61_VALUE2 qual_VALUE2,
7301: QUAL61_VALUE3 qual_VALUE3, ORG_ID,
7302: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7303: CREATED_BY, CREATION_DATE
7304: FROM JTY_WEBADI_OTH_TERR_INTF jut
7305: where jut.USER_SEQUENCE = v_user_sequence
7306: and jut.status is null
7307: and jut.terr_qual_id61 is not null
7308: and jut.QUAL61_VALUE_ID is null
7317: QUAL62_VALUE2 qual_VALUE2,
7318: QUAL62_VALUE3 qual_VALUE3, ORG_ID,
7319: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7320: CREATED_BY, CREATION_DATE
7321: FROM JTY_WEBADI_OTH_TERR_INTF jut
7322: where jut.USER_SEQUENCE = v_user_sequence
7323: and jut.status is null
7324: and jut.terr_qual_id62 is not null
7325: and jut.QUAL62_VALUE_ID is null
7334: QUAL63_VALUE2 qual_VALUE2,
7335: QUAL63_VALUE3 qual_VALUE3, ORG_ID,
7336: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7337: CREATED_BY, CREATION_DATE
7338: FROM JTY_WEBADI_OTH_TERR_INTF jut
7339: where jut.USER_SEQUENCE = v_user_sequence
7340: and jut.status is null
7341: and jut.terr_qual_id63 is not null
7342: and jut.QUAL63_VALUE_ID is null
7351: QUAL64_VALUE2 qual_VALUE2,
7352: QUAL64_VALUE3 qual_VALUE3, ORG_ID,
7353: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7354: CREATED_BY, CREATION_DATE
7355: FROM JTY_WEBADI_OTH_TERR_INTF jut
7356: where jut.USER_SEQUENCE = v_user_sequence
7357: and jut.status is null
7358: and jut.terr_qual_id64 is not null
7359: and jut.QUAL64_VALUE_ID is null
7368: QUAL65_VALUE2 qual_valUE2,
7369: QUAL65_VALUE3 qual_valUE3, ORG_ID,
7370: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7371: CREATED_BY, CREATION_DATE
7372: FROM JTY_WEBADI_OTH_TERR_INTF jut
7373: where jut.USER_SEQUENCE = v_user_sequence
7374: and jut.status is null
7375: and jut.terr_qual_id65 is not null
7376: and jut.QUAL65_VALUE_ID is null
7385: QUAL66_VALUE2 qual_VALUE2,
7386: QUAL66_VALUE3 qual_VALUE3, ORG_ID,
7387: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7388: CREATED_BY, CREATION_DATE
7389: FROM JTY_WEBADI_OTH_TERR_INTF jut
7390: where jut.USER_SEQUENCE = v_user_sequence
7391: and jut.status is null
7392: and jut.terr_qual_id66 is not null
7393: and jut.QUAL66_VALUE_ID is null
7402: QUAL67_VALUE2 qual_VALUE2,
7403: QUAL67_VALUE3 qual_VALUE3, ORG_ID,
7404: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7405: CREATED_BY, CREATION_DATE
7406: FROM JTY_WEBADI_OTH_TERR_INTF jut
7407: where jut.USER_SEQUENCE = v_user_sequence
7408: and jut.status is null
7409: and jut.terr_qual_id67 is not null
7410: and jut.QUAL67_VALUE_ID is null
7419: QUAL68_VALUE2 qual_VALUE2,
7420: QUAL68_VALUE3 qual_VALUE3, ORG_ID,
7421: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7422: CREATED_BY, CREATION_DATE
7423: FROM JTY_WEBADI_OTH_TERR_INTF jut
7424: where jut.USER_SEQUENCE = v_user_sequence
7425: and jut.status is null
7426: and jut.terr_qual_id68 is not null
7427: and jut.QUAL68_VALUE_ID is null
7436: QUAL69_VALUE2 qual_VALUE2,
7437: QUAL69_VALUE3 qual_VALUE3, ORG_ID,
7438: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7439: CREATED_BY, CREATION_DATE
7440: FROM JTY_WEBADI_OTH_TERR_INTF jut
7441: where jut.USER_SEQUENCE = v_user_sequence
7442: and jut.status is null
7443: and jut.terr_qual_id69 is not null
7444: and jut.QUAL69_VALUE_ID is null
7453: QUAL70_VALUE2 qual_VALUE2,
7454: QUAL70_VALUE3 qual_VALUE3, ORG_ID,
7455: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7456: CREATED_BY, CREATION_DATE
7457: FROM JTY_WEBADI_OTH_TERR_INTF jut
7458: where jut.USER_SEQUENCE = v_user_sequence
7459: and jut.status is null
7460: and jut.terr_qual_id70 is not null
7461: and jut.QUAL70_VALUE_ID is null
7470: QUAL71_VALUE2 qual_VALUE2,
7471: QUAL71_VALUE3 qual_VALUE3, ORG_ID,
7472: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7473: CREATED_BY, CREATION_DATE
7474: FROM JTY_WEBADI_OTH_TERR_INTF jut
7475: where jut.USER_SEQUENCE = v_user_sequence
7476: and jut.status is null
7477: and jut.terr_qual_id71 is not null
7478: and jut.QUAL71_VALUE_ID is null
7487: QUAL72_VALUE2 qual_VALUE2,
7488: QUAL72_VALUE3 qual_VALUE3, ORG_ID,
7489: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7490: CREATED_BY, CREATION_DATE
7491: FROM JTY_WEBADI_OTH_TERR_INTF jut
7492: where jut.USER_SEQUENCE = v_user_sequence
7493: and jut.status is null
7494: and jut.terr_qual_id72 is not null
7495: and jut.QUAL72_VALUE_ID is null
7504: QUAL73_VALUE2 qual_VALUE2,
7505: QUAL73_VALUE3 qual_VALUE3, ORG_ID,
7506: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7507: CREATED_BY, CREATION_DATE
7508: FROM JTY_WEBADI_OTH_TERR_INTF jut
7509: where jut.USER_SEQUENCE = v_user_sequence
7510: and jut.status is null
7511: and jut.terr_qual_id73 is not null
7512: and jut.QUAL73_VALUE_ID is null
7521: QUAL74_VALUE2 qual_VALUE2,
7522: QUAL74_VALUE3 qual_VALUE3, ORG_ID,
7523: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7524: CREATED_BY, CREATION_DATE
7525: FROM JTY_WEBADI_OTH_TERR_INTF jut
7526: where jut.USER_SEQUENCE = v_user_sequence
7527: and jut.status is null
7528: and jut.terr_qual_id74 is not null
7529: and jut.QUAL74_VALUE_ID is null
7538: QUAL75_VALUE2 qual_valUE2,
7539: QUAL75_VALUE3 qual_valUE3, ORG_ID,
7540: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7541: CREATED_BY, CREATION_DATE
7542: FROM JTY_WEBADI_OTH_TERR_INTF jut
7543: where jut.USER_SEQUENCE = v_user_sequence
7544: and jut.status is null
7545: and jut.terr_qual_id75 is not null
7546: and jut.QUAL75_VALUE_ID is null
7577: QUAL1_VALUE2 qual_VALUE2,
7578: QUAL1_VALUE3 qual_VALUE3, ORG_ID,
7579: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7580: CREATED_BY, CREATION_DATE
7581: FROM JTY_WEBADI_OTH_TERR_INTF jut
7582: where jut.USER_SEQUENCE = v_user_sequence
7583: and jut.status is null
7584: and jut.terr_qual_id1 is not null
7585: and jut.QUAL1_VALUE_ID is not null
7595: QUAL2_VALUE2 qual_VALUE2,
7596: QUAL2_VALUE3 qual_VALUE3, ORG_ID,
7597: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7598: CREATED_BY, CREATION_DATE
7599: FROM JTY_WEBADI_OTH_TERR_INTF jut
7600: where jut.USER_SEQUENCE = v_user_sequence
7601: and jut.status is null
7602: and jut.terr_qual_id2 is not null
7603: and jut.QUAL2_VALUE_ID is not null
7613: QUAL3_VALUE2 qual_VALUE2,
7614: QUAL3_VALUE3 qual_VALUE3, ORG_ID,
7615: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7616: CREATED_BY, CREATION_DATE
7617: FROM JTY_WEBADI_OTH_TERR_INTF jut
7618: where jut.USER_SEQUENCE = v_user_sequence
7619: and jut.status is null
7620: and jut.terr_qual_id3 is not null
7621: and jut.QUAL3_VALUE_ID is not null
7631: QUAL4_VALUE2 qual_VALUE2,
7632: QUAL4_VALUE3 qual_VALUE3, ORG_ID,
7633: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7634: CREATED_BY, CREATION_DATE
7635: FROM JTY_WEBADI_OTH_TERR_INTF jut
7636: where jut.USER_SEQUENCE = v_user_sequence
7637: and jut.status is null
7638: and jut.terr_qual_id4 is not null
7639: and jut.QUAL4_VALUE_ID is not null
7649: QUAL5_VALUE2 qual_VALUE2,
7650: QUAL5_VALUE3 qual_VALUE3, ORG_ID,
7651: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7652: CREATED_BY, CREATION_DATE
7653: FROM JTY_WEBADI_OTH_TERR_INTF jut
7654: where jut.USER_SEQUENCE = v_user_sequence
7655: and jut.status is null
7656: and jut.terr_qual_id5 is not null
7657: and jut.QUAL5_VALUE_ID is not null
7667: QUAL6_VALUE2 qual_VALUE2,
7668: QUAL6_VALUE3 qual_VALUE3, ORG_ID,
7669: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7670: CREATED_BY, CREATION_DATE
7671: FROM JTY_WEBADI_OTH_TERR_INTF jut
7672: where jut.USER_SEQUENCE = v_user_sequence
7673: and jut.status is null
7674: and jut.terr_qual_id6 is not null
7675: and jut.QUAL6_VALUE_ID is not null
7685: QUAL7_VALUE2 qual_VALUE2,
7686: QUAL7_VALUE3 qual_VALUE3, ORG_ID,
7687: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7688: CREATED_BY, CREATION_DATE
7689: FROM JTY_WEBADI_OTH_TERR_INTF jut
7690: where jut.USER_SEQUENCE = v_user_sequence
7691: and jut.status is null
7692: and jut.terr_qual_id7 is not null
7693: and jut.QUAL7_VALUE_ID is not null
7703: QUAL8_VALUE2 qual_VALUE2,
7704: QUAL8_VALUE3 qual_VALUE3, ORG_ID,
7705: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7706: CREATED_BY, CREATION_DATE
7707: FROM JTY_WEBADI_OTH_TERR_INTF jut
7708: where jut.USER_SEQUENCE = v_user_sequence
7709: and jut.status is null
7710: and jut.terr_qual_id8 is not null
7711: and jut.QUAL8_VALUE_ID is not null
7721: QUAL9_VALUE2 qual_VALUE2,
7722: QUAL9_VALUE3 qual_VALUE3, ORG_ID,
7723: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7724: CREATED_BY, CREATION_DATE
7725: FROM JTY_WEBADI_OTH_TERR_INTF jut
7726: where jut.USER_SEQUENCE = v_user_sequence
7727: and jut.status is null
7728: and jut.terr_qual_id9 is not null
7729: and jut.QUAL9_VALUE_ID is not null
7739: QUAL10_VALUE2 qual_VALUE2,
7740: QUAL10_VALUE3 qual_VALUE3, ORG_ID,
7741: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7742: CREATED_BY, CREATION_DATE
7743: FROM JTY_WEBADI_OTH_TERR_INTF jut
7744: where jut.USER_SEQUENCE = v_user_sequence
7745: and jut.status is null
7746: and jut.terr_qual_id10 is not null
7747: and jut.QUAL10_VALUE_ID is not null
7757: QUAL11_VALUE2 qual_VALUE2,
7758: QUAL11_VALUE3 qual_VALUE3, ORG_ID,
7759: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7760: CREATED_BY, CREATION_DATE
7761: FROM JTY_WEBADI_OTH_TERR_INTF jut
7762: where jut.USER_SEQUENCE = v_user_sequence
7763: and jut.status is null
7764: and jut.terr_qual_id11 is not null
7765: and jut.QUAL11_VALUE_ID is not null
7775: QUAL12_VALUE2 qual_VALUE2,
7776: QUAL12_VALUE3 qual_VALUE3, ORG_ID,
7777: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7778: CREATED_BY, CREATION_DATE
7779: FROM JTY_WEBADI_OTH_TERR_INTF jut
7780: where jut.USER_SEQUENCE = v_user_sequence
7781: and jut.status is null
7782: and jut.terr_qual_id12 is not null
7783: and jut.QUAL12_VALUE_ID is not null
7793: QUAL13_VALUE2 qual_VALUE2,
7794: QUAL13_VALUE3 qual_VALUE3, ORG_ID,
7795: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7796: CREATED_BY, CREATION_DATE
7797: FROM JTY_WEBADI_OTH_TERR_INTF jut
7798: where jut.USER_SEQUENCE = v_user_sequence
7799: and jut.status is null
7800: and jut.terr_qual_id13 is not null
7801: and jut.QUAL13_VALUE_ID is not null
7811: QUAL14_VALUE2 qual_VALUE2,
7812: QUAL14_VALUE3 qual_VALUE3, ORG_ID,
7813: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7814: CREATED_BY, CREATION_DATE
7815: FROM JTY_WEBADI_OTH_TERR_INTF jut
7816: where jut.USER_SEQUENCE = v_user_sequence
7817: and jut.status is null
7818: and jut.terr_qual_id14 is not null
7819: and jut.QUAL14_VALUE_ID is not null
7829: QUAL15_VALUE2 qual_VALUE2,
7830: QUAL15_VALUE3 qual_VALUE3, ORG_ID,
7831: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7832: CREATED_BY, CREATION_DATE
7833: FROM JTY_WEBADI_OTH_TERR_INTF jut
7834: where jut.USER_SEQUENCE = v_user_sequence
7835: and jut.status is null
7836: and jut.terr_qual_id15 is not null
7837: and jut.QUAL15_VALUE_ID is not null
7847: QUAL16_VALUE2 qual_VALUE2,
7848: QUAL16_VALUE3 qual_VALUE3, ORG_ID,
7849: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7850: CREATED_BY, CREATION_DATE
7851: FROM JTY_WEBADI_OTH_TERR_INTF jut
7852: where jut.USER_SEQUENCE = v_user_sequence
7853: and jut.status is null
7854: and jut.terr_qual_id16 is not null
7855: and jut.QUAL16_VALUE_ID is not null
7865: QUAL17_VALUE2 qual_VALUE2,
7866: QUAL17_VALUE3 qual_VALUE3, ORG_ID,
7867: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7868: CREATED_BY, CREATION_DATE
7869: FROM JTY_WEBADI_OTH_TERR_INTF jut
7870: where jut.USER_SEQUENCE = v_user_sequence
7871: and jut.status is null
7872: and jut.terr_qual_id17 is not null
7873: and jut.QUAL17_VALUE_ID is not null
7883: QUAL18_VALUE2 qual_VALUE2,
7884: QUAL18_VALUE3 qual_VALUE3, ORG_ID,
7885: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7886: CREATED_BY, CREATION_DATE
7887: FROM JTY_WEBADI_OTH_TERR_INTF jut
7888: where jut.USER_SEQUENCE = v_user_sequence
7889: and jut.status is null
7890: and jut.terr_qual_id18 is not null
7891: and jut.QUAL18_VALUE_ID is not null
7901: QUAL19_VALUE2 qual_VALUE2,
7902: QUAL19_VALUE3 qual_VALUE3, ORG_ID,
7903: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7904: CREATED_BY, CREATION_DATE
7905: FROM JTY_WEBADI_OTH_TERR_INTF jut
7906: where jut.USER_SEQUENCE = v_user_sequence
7907: and jut.status is null
7908: and jut.terr_qual_id19 is not null
7909: and jut.QUAL19_VALUE_ID is not null
7919: QUAL20_VALUE2 qual_VALUE2,
7920: QUAL20_VALUE3 qual_VALUE3, ORG_ID,
7921: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7922: CREATED_BY, CREATION_DATE
7923: FROM JTY_WEBADI_OTH_TERR_INTF jut
7924: where jut.USER_SEQUENCE = v_user_sequence
7925: and jut.status is null
7926: and jut.terr_qual_id20 is not null
7927: and jut.QUAL20_VALUE_ID is not null
7937: QUAL21_VALUE2 qual_VALUE2,
7938: QUAL21_VALUE3 qual_VALUE3, ORG_ID,
7939: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7940: CREATED_BY, CREATION_DATE
7941: FROM JTY_WEBADI_OTH_TERR_INTF jut
7942: where jut.USER_SEQUENCE = v_user_sequence
7943: and jut.status is null
7944: and jut.terr_qual_id21 is not null
7945: and jut.QUAL21_VALUE_ID is not null
7955: QUAL22_VALUE2 qual_VALUE2,
7956: QUAL22_VALUE3 qual_VALUE3, ORG_ID,
7957: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7958: CREATED_BY, CREATION_DATE
7959: FROM JTY_WEBADI_OTH_TERR_INTF jut
7960: where jut.USER_SEQUENCE = v_user_sequence
7961: and jut.status is null
7962: and jut.terr_qual_id22 is not null
7963: and jut.QUAL22_VALUE_ID is not null
7973: QUAL23_VALUE2 qual_VALUE2,
7974: QUAL23_VALUE3 qual_VALUE3, ORG_ID,
7975: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7976: CREATED_BY, CREATION_DATE
7977: FROM JTY_WEBADI_OTH_TERR_INTF jut
7978: where jut.USER_SEQUENCE = v_user_sequence
7979: and jut.status is null
7980: and jut.terr_qual_id23 is not null
7981: and jut.QUAL23_VALUE_ID is not null
7991: QUAL24_VALUE2 qual_VALUE2,
7992: QUAL24_VALUE3 qual_VALUE3, ORG_ID,
7993: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
7994: CREATED_BY, CREATION_DATE
7995: FROM JTY_WEBADI_OTH_TERR_INTF jut
7996: where jut.USER_SEQUENCE = v_user_sequence
7997: and jut.status is null
7998: and jut.terr_qual_id24 is not null
7999: and jut.QUAL24_VALUE_ID is not null
8009: QUAL25_VALUE2 qual_valUE2,
8010: QUAL25_VALUE3 qual_valUE3, ORG_ID,
8011: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8012: CREATED_BY, CREATION_DATE
8013: FROM JTY_WEBADI_OTH_TERR_INTF jut
8014: where jut.USER_SEQUENCE = v_user_sequence
8015: and jut.status is null
8016: and jut.terr_qual_id25 is not null
8017: and jut.QUAL25_VALUE_ID is not null
8027: QUAL26_VALUE2 qual_VALUE2,
8028: QUAL26_VALUE3 qual_VALUE3, ORG_ID,
8029: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8030: CREATED_BY, CREATION_DATE
8031: FROM JTY_WEBADI_OTH_TERR_INTF jut
8032: where jut.USER_SEQUENCE = v_user_sequence
8033: and jut.status is null
8034: and jut.terr_qual_id26 is not null
8035: and jut.QUAL26_VALUE_ID is not null
8045: QUAL27_VALUE2 qual_VALUE2,
8046: QUAL27_VALUE3 qual_VALUE3, ORG_ID,
8047: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8048: CREATED_BY, CREATION_DATE
8049: FROM JTY_WEBADI_OTH_TERR_INTF jut
8050: where jut.USER_SEQUENCE = v_user_sequence
8051: and jut.status is null
8052: and jut.terr_qual_id27 is not null
8053: and jut.QUAL27_VALUE_ID is not null
8063: QUAL28_VALUE2 qual_VALUE2,
8064: QUAL28_VALUE3 qual_VALUE3, ORG_ID,
8065: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8066: CREATED_BY, CREATION_DATE
8067: FROM JTY_WEBADI_OTH_TERR_INTF jut
8068: where jut.USER_SEQUENCE = v_user_sequence
8069: and jut.status is null
8070: and jut.terr_qual_id28 is not null
8071: and jut.QUAL28_VALUE_ID is not null
8081: QUAL29_VALUE2 qual_VALUE2,
8082: QUAL29_VALUE3 qual_VALUE3, ORG_ID,
8083: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8084: CREATED_BY, CREATION_DATE
8085: FROM JTY_WEBADI_OTH_TERR_INTF jut
8086: where jut.USER_SEQUENCE = v_user_sequence
8087: and jut.status is null
8088: and jut.terr_qual_id29 is not null
8089: and jut.QUAL29_VALUE_ID is not null
8099: QUAL30_VALUE2 qual_VALUE2,
8100: QUAL30_VALUE3 qual_VALUE3, ORG_ID,
8101: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8102: CREATED_BY, CREATION_DATE
8103: FROM JTY_WEBADI_OTH_TERR_INTF jut
8104: where jut.USER_SEQUENCE = v_user_sequence
8105: and jut.status is null
8106: and jut.terr_qual_id30 is not null
8107: and jut.QUAL30_VALUE_ID is not null
8117: QUAL31_VALUE2 qual_VALUE2,
8118: QUAL31_VALUE3 qual_VALUE3, ORG_ID,
8119: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8120: CREATED_BY, CREATION_DATE
8121: FROM JTY_WEBADI_OTH_TERR_INTF jut
8122: where jut.USER_SEQUENCE = v_user_sequence
8123: and jut.status is null
8124: and jut.terr_qual_id31 is not null
8125: and jut.QUAL31_VALUE_ID is not null
8135: QUAL32_VALUE2 qual_VALUE2,
8136: QUAL32_VALUE3 qual_VALUE3, ORG_ID,
8137: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8138: CREATED_BY, CREATION_DATE
8139: FROM JTY_WEBADI_OTH_TERR_INTF jut
8140: where jut.USER_SEQUENCE = v_user_sequence
8141: and jut.status is null
8142: and jut.terr_qual_id32 is not null
8143: and jut.QUAL32_VALUE_ID is not null
8153: QUAL33_VALUE2 qual_VALUE2,
8154: QUAL33_VALUE3 qual_VALUE3, ORG_ID,
8155: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8156: CREATED_BY, CREATION_DATE
8157: FROM JTY_WEBADI_OTH_TERR_INTF jut
8158: where jut.USER_SEQUENCE = v_user_sequence
8159: and jut.status is null
8160: and jut.terr_qual_id33 is not null
8161: and jut.QUAL33_VALUE_ID is not null
8171: QUAL34_VALUE2 qual_VALUE2,
8172: QUAL34_VALUE3 qual_VALUE3, ORG_ID,
8173: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8174: CREATED_BY, CREATION_DATE
8175: FROM JTY_WEBADI_OTH_TERR_INTF jut
8176: where jut.USER_SEQUENCE = v_user_sequence
8177: and jut.status is null
8178: and jut.terr_qual_id34 is not null
8179: and jut.QUAL34_VALUE_ID is not null
8189: QUAL35_VALUE2 qual_valUE2,
8190: QUAL35_VALUE3 qual_valUE3, ORG_ID,
8191: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8192: CREATED_BY, CREATION_DATE
8193: FROM JTY_WEBADI_OTH_TERR_INTF jut
8194: where jut.USER_SEQUENCE = v_user_sequence
8195: and jut.status is null
8196: and jut.terr_qual_id35 is not null
8197: and jut.QUAL35_VALUE_ID is not null
8207: QUAL36_VALUE2 qual_VALUE2,
8208: QUAL36_VALUE3 qual_VALUE3, ORG_ID,
8209: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8210: CREATED_BY, CREATION_DATE
8211: FROM JTY_WEBADI_OTH_TERR_INTF jut
8212: where jut.USER_SEQUENCE = v_user_sequence
8213: and jut.status is null
8214: and jut.terr_qual_id36 is not null
8215: and jut.QUAL36_VALUE_ID is not null
8225: QUAL37_VALUE2 qual_VALUE2,
8226: QUAL37_VALUE3 qual_VALUE3, ORG_ID,
8227: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8228: CREATED_BY, CREATION_DATE
8229: FROM JTY_WEBADI_OTH_TERR_INTF jut
8230: where jut.USER_SEQUENCE = v_user_sequence
8231: and jut.status is null
8232: and jut.terr_qual_id37 is not null
8233: and jut.QUAL37_VALUE_ID is not null
8243: QUAL38_VALUE2 qual_VALUE2,
8244: QUAL38_VALUE3 qual_VALUE3, ORG_ID,
8245: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8246: CREATED_BY, CREATION_DATE
8247: FROM JTY_WEBADI_OTH_TERR_INTF jut
8248: where jut.USER_SEQUENCE = v_user_sequence
8249: and jut.status is null
8250: and jut.terr_qual_id38 is not null
8251: and jut.QUAL38_VALUE_ID is not null
8261: QUAL39_VALUE2 qual_VALUE2,
8262: QUAL39_VALUE3 qual_VALUE3, ORG_ID,
8263: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8264: CREATED_BY, CREATION_DATE
8265: FROM JTY_WEBADI_OTH_TERR_INTF jut
8266: where jut.USER_SEQUENCE = v_user_sequence
8267: and jut.status is null
8268: and jut.terr_qual_id39 is not null
8269: and jut.QUAL39_VALUE_ID is not null
8279: QUAL40_VALUE2 qual_VALUE2,
8280: QUAL40_VALUE3 qual_VALUE3, ORG_ID,
8281: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8282: CREATED_BY, CREATION_DATE
8283: FROM JTY_WEBADI_OTH_TERR_INTF jut
8284: where jut.USER_SEQUENCE = v_user_sequence
8285: and jut.status is null
8286: and jut.terr_qual_id40 is not null
8287: and jut.QUAL40_VALUE_ID is not null
8297: QUAL41_VALUE2 qual_VALUE2,
8298: QUAL41_VALUE3 qual_VALUE3, ORG_ID,
8299: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8300: CREATED_BY, CREATION_DATE
8301: FROM JTY_WEBADI_OTH_TERR_INTF jut
8302: where jut.USER_SEQUENCE = v_user_sequence
8303: and jut.status is null
8304: and jut.terr_qual_id41 is not null
8305: and jut.QUAL41_VALUE_ID is not null
8315: QUAL42_VALUE2 qual_VALUE2,
8316: QUAL42_VALUE3 qual_VALUE3, ORG_ID,
8317: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8318: CREATED_BY, CREATION_DATE
8319: FROM JTY_WEBADI_OTH_TERR_INTF jut
8320: where jut.USER_SEQUENCE = v_user_sequence
8321: and jut.status is null
8322: and jut.terr_qual_id42 is not null
8323: and jut.QUAL42_VALUE_ID is not null
8333: QUAL43_VALUE2 qual_VALUE2,
8334: QUAL43_VALUE3 qual_VALUE3, ORG_ID,
8335: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8336: CREATED_BY, CREATION_DATE
8337: FROM JTY_WEBADI_OTH_TERR_INTF jut
8338: where jut.USER_SEQUENCE = v_user_sequence
8339: and jut.status is null
8340: and jut.terr_qual_id43 is not null
8341: and jut.QUAL43_VALUE_ID is not null
8351: QUAL44_VALUE2 qual_VALUE2,
8352: QUAL44_VALUE3 qual_VALUE3, ORG_ID,
8353: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8354: CREATED_BY, CREATION_DATE
8355: FROM JTY_WEBADI_OTH_TERR_INTF jut
8356: where jut.USER_SEQUENCE = v_user_sequence
8357: and jut.status is null
8358: and jut.terr_qual_id44 is not null
8359: and jut.QUAL44_VALUE_ID is not null
8369: QUAL45_VALUE2 qual_valUE2,
8370: QUAL45_VALUE3 qual_valUE3, ORG_ID,
8371: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8372: CREATED_BY, CREATION_DATE
8373: FROM JTY_WEBADI_OTH_TERR_INTF jut
8374: where jut.USER_SEQUENCE = v_user_sequence
8375: and jut.status is null
8376: and jut.terr_qual_id45 is not null
8377: and jut.QUAL45_VALUE_ID is not null
8387: QUAL46_VALUE2 qual_VALUE2,
8388: QUAL46_VALUE3 qual_VALUE3, ORG_ID,
8389: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8390: CREATED_BY, CREATION_DATE
8391: FROM JTY_WEBADI_OTH_TERR_INTF jut
8392: where jut.USER_SEQUENCE = v_user_sequence
8393: and jut.status is null
8394: and jut.terr_qual_id46 is not null
8395: and jut.QUAL46_VALUE_ID is not null
8405: QUAL47_VALUE2 qual_VALUE2,
8406: QUAL47_VALUE3 qual_VALUE3, ORG_ID,
8407: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8408: CREATED_BY, CREATION_DATE
8409: FROM JTY_WEBADI_OTH_TERR_INTF jut
8410: where jut.USER_SEQUENCE = v_user_sequence
8411: and jut.status is null
8412: and jut.terr_qual_id47 is not null
8413: and jut.QUAL47_VALUE_ID is not null
8423: QUAL48_VALUE2 qual_VALUE2,
8424: QUAL48_VALUE3 qual_VALUE3, ORG_ID,
8425: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8426: CREATED_BY, CREATION_DATE
8427: FROM JTY_WEBADI_OTH_TERR_INTF jut
8428: where jut.USER_SEQUENCE = v_user_sequence
8429: and jut.status is null
8430: and jut.terr_qual_id48 is not null
8431: and jut.QUAL48_VALUE_ID is not null
8441: QUAL49_VALUE2 qual_VALUE2,
8442: QUAL49_VALUE3 qual_VALUE3, ORG_ID,
8443: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8444: CREATED_BY, CREATION_DATE
8445: FROM JTY_WEBADI_OTH_TERR_INTF jut
8446: where jut.USER_SEQUENCE = v_user_sequence
8447: and jut.status is null
8448: and jut.terr_qual_id49 is not null
8449: and jut.QUAL49_VALUE_ID is not null
8459: QUAL50_VALUE2 qual_VALUE2,
8460: QUAL50_VALUE3 qual_VALUE3, ORG_ID,
8461: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8462: CREATED_BY, CREATION_DATE
8463: FROM JTY_WEBADI_OTH_TERR_INTF jut
8464: where jut.USER_SEQUENCE = v_user_sequence
8465: and jut.status is null
8466: and jut.terr_qual_id50 is not null
8467: and jut.QUAL50_VALUE_ID is not null
8477: QUAL51_VALUE2 qual_VALUE2,
8478: QUAL51_VALUE3 qual_VALUE3, ORG_ID,
8479: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8480: CREATED_BY, CREATION_DATE
8481: FROM JTY_WEBADI_OTH_TERR_INTF jut
8482: where jut.USER_SEQUENCE = v_user_sequence
8483: and jut.status is null
8484: and jut.terr_qual_id51 is not null
8485: and jut.QUAL51_VALUE_ID is not null
8495: QUAL52_VALUE2 qual_VALUE2,
8496: QUAL52_VALUE3 qual_VALUE3, ORG_ID,
8497: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8498: CREATED_BY, CREATION_DATE
8499: FROM JTY_WEBADI_OTH_TERR_INTF jut
8500: where jut.USER_SEQUENCE = v_user_sequence
8501: and jut.status is null
8502: and jut.terr_qual_id52 is not null
8503: and jut.QUAL52_VALUE_ID is not null
8513: QUAL53_VALUE2 qual_VALUE2,
8514: QUAL53_VALUE3 qual_VALUE3, ORG_ID,
8515: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8516: CREATED_BY, CREATION_DATE
8517: FROM JTY_WEBADI_OTH_TERR_INTF jut
8518: where jut.USER_SEQUENCE = v_user_sequence
8519: and jut.status is null
8520: and jut.terr_qual_id53 is not null
8521: and jut.QUAL53_VALUE_ID is not null
8531: QUAL54_VALUE2 qual_VALUE2,
8532: QUAL54_VALUE3 qual_VALUE3, ORG_ID,
8533: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8534: CREATED_BY, CREATION_DATE
8535: FROM JTY_WEBADI_OTH_TERR_INTF jut
8536: where jut.USER_SEQUENCE = v_user_sequence
8537: and jut.status is null
8538: and jut.terr_qual_id54 is not null
8539: and jut.QUAL54_VALUE_ID is not null
8549: QUAL55_VALUE2 qual_valUE2,
8550: QUAL55_VALUE3 qual_valUE3, ORG_ID,
8551: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8552: CREATED_BY, CREATION_DATE
8553: FROM JTY_WEBADI_OTH_TERR_INTF jut
8554: where jut.USER_SEQUENCE = v_user_sequence
8555: and jut.status is null
8556: and jut.terr_qual_id55 is not null
8557: and jut.QUAL55_VALUE_ID is not null
8567: QUAL56_VALUE2 qual_VALUE2,
8568: QUAL56_VALUE3 qual_VALUE3, ORG_ID,
8569: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8570: CREATED_BY, CREATION_DATE
8571: FROM JTY_WEBADI_OTH_TERR_INTF jut
8572: where jut.USER_SEQUENCE = v_user_sequence
8573: and jut.status is null
8574: and jut.terr_qual_id56 is not null
8575: and jut.QUAL56_VALUE_ID is not null
8585: QUAL57_VALUE2 qual_VALUE2,
8586: QUAL57_VALUE3 qual_VALUE3, ORG_ID,
8587: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8588: CREATED_BY, CREATION_DATE
8589: FROM JTY_WEBADI_OTH_TERR_INTF jut
8590: where jut.USER_SEQUENCE = v_user_sequence
8591: and jut.status is null
8592: and jut.terr_qual_id57 is not null
8593: and jut.QUAL57_VALUE_ID is not null
8603: QUAL58_VALUE2 qual_VALUE2,
8604: QUAL58_VALUE3 qual_VALUE3, ORG_ID,
8605: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8606: CREATED_BY, CREATION_DATE
8607: FROM JTY_WEBADI_OTH_TERR_INTF jut
8608: where jut.USER_SEQUENCE = v_user_sequence
8609: and jut.status is null
8610: and jut.terr_qual_id58 is not null
8611: and jut.QUAL58_VALUE_ID is not null
8621: QUAL59_VALUE2 qual_VALUE2,
8622: QUAL59_VALUE3 qual_VALUE3, ORG_ID,
8623: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8624: CREATED_BY, CREATION_DATE
8625: FROM JTY_WEBADI_OTH_TERR_INTF jut
8626: where jut.USER_SEQUENCE = v_user_sequence
8627: and jut.status is null
8628: and jut.terr_qual_id59 is not null
8629: and jut.QUAL59_VALUE_ID is not null
8639: QUAL60_VALUE2 qual_VALUE2,
8640: QUAL60_VALUE3 qual_VALUE3, ORG_ID,
8641: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8642: CREATED_BY, CREATION_DATE
8643: FROM JTY_WEBADI_OTH_TERR_INTF jut
8644: where jut.USER_SEQUENCE = v_user_sequence
8645: and jut.status is null
8646: and jut.terr_qual_id60 is not null
8647: and jut.QUAL60_VALUE_ID is not null
8657: QUAL61_VALUE2 qual_VALUE2,
8658: QUAL61_VALUE3 qual_VALUE3, ORG_ID,
8659: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8660: CREATED_BY, CREATION_DATE
8661: FROM JTY_WEBADI_OTH_TERR_INTF jut
8662: where jut.USER_SEQUENCE = v_user_sequence
8663: and jut.status is null
8664: and jut.terr_qual_id61 is not null
8665: and jut.QUAL61_VALUE_ID is not null
8675: QUAL62_VALUE2 qual_VALUE2,
8676: QUAL62_VALUE3 qual_VALUE3, ORG_ID,
8677: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8678: CREATED_BY, CREATION_DATE
8679: FROM JTY_WEBADI_OTH_TERR_INTF jut
8680: where jut.USER_SEQUENCE = v_user_sequence
8681: and jut.status is null
8682: and jut.terr_qual_id62 is not null
8683: and jut.QUAL62_VALUE_ID is not null
8693: QUAL63_VALUE2 qual_VALUE2,
8694: QUAL63_VALUE3 qual_VALUE3, ORG_ID,
8695: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8696: CREATED_BY, CREATION_DATE
8697: FROM JTY_WEBADI_OTH_TERR_INTF jut
8698: where jut.USER_SEQUENCE = v_user_sequence
8699: and jut.status is null
8700: and jut.terr_qual_id63 is not null
8701: and jut.QUAL63_VALUE_ID is not null
8711: QUAL64_VALUE2 qual_VALUE2,
8712: QUAL64_VALUE3 qual_VALUE3, ORG_ID,
8713: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8714: CREATED_BY, CREATION_DATE
8715: FROM JTY_WEBADI_OTH_TERR_INTF jut
8716: where jut.USER_SEQUENCE = v_user_sequence
8717: and jut.status is null
8718: and jut.terr_qual_id64 is not null
8719: and jut.QUAL64_VALUE_ID is not null
8729: QUAL65_VALUE2 qual_valUE2,
8730: QUAL65_VALUE3 qual_valUE3, ORG_ID,
8731: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8732: CREATED_BY, CREATION_DATE
8733: FROM JTY_WEBADI_OTH_TERR_INTF jut
8734: where jut.USER_SEQUENCE = v_user_sequence
8735: and jut.status is null
8736: and jut.terr_qual_id65 is not null
8737: and jut.QUAL65_VALUE_ID is not null
8747: QUAL66_VALUE2 qual_VALUE2,
8748: QUAL66_VALUE3 qual_VALUE3, ORG_ID,
8749: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8750: CREATED_BY, CREATION_DATE
8751: FROM JTY_WEBADI_OTH_TERR_INTF jut
8752: where jut.USER_SEQUENCE = v_user_sequence
8753: and jut.status is null
8754: and jut.terr_qual_id66 is not null
8755: and jut.QUAL66_VALUE_ID is not null
8765: QUAL67_VALUE2 qual_VALUE2,
8766: QUAL67_VALUE3 qual_VALUE3, ORG_ID,
8767: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8768: CREATED_BY, CREATION_DATE
8769: FROM JTY_WEBADI_OTH_TERR_INTF jut
8770: where jut.USER_SEQUENCE = v_user_sequence
8771: and jut.status is null
8772: and jut.terr_qual_id67 is not null
8773: and jut.QUAL67_VALUE_ID is not null
8783: QUAL68_VALUE2 qual_VALUE2,
8784: QUAL68_VALUE3 qual_VALUE3, ORG_ID,
8785: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8786: CREATED_BY, CREATION_DATE
8787: FROM JTY_WEBADI_OTH_TERR_INTF jut
8788: where jut.USER_SEQUENCE = v_user_sequence
8789: and jut.status is null
8790: and jut.terr_qual_id68 is not null
8791: and jut.QUAL68_VALUE_ID is not null
8801: QUAL69_VALUE2 qual_VALUE2,
8802: QUAL69_VALUE3 qual_VALUE3, ORG_ID,
8803: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8804: CREATED_BY, CREATION_DATE
8805: FROM JTY_WEBADI_OTH_TERR_INTF jut
8806: where jut.USER_SEQUENCE = v_user_sequence
8807: and jut.status is null
8808: and jut.terr_qual_id69 is not null
8809: and jut.QUAL69_VALUE_ID is not null
8819: QUAL70_VALUE2 qual_VALUE2,
8820: QUAL70_VALUE3 qual_VALUE3, ORG_ID,
8821: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8822: CREATED_BY, CREATION_DATE
8823: FROM JTY_WEBADI_OTH_TERR_INTF jut
8824: where jut.USER_SEQUENCE = v_user_sequence
8825: and jut.status is null
8826: and jut.terr_qual_id70 is not null
8827: and jut.QUAL70_VALUE_ID is not null
8837: QUAL71_VALUE2 qual_VALUE2,
8838: QUAL71_VALUE3 qual_VALUE3, ORG_ID,
8839: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8840: CREATED_BY, CREATION_DATE
8841: FROM JTY_WEBADI_OTH_TERR_INTF jut
8842: where jut.USER_SEQUENCE = v_user_sequence
8843: and jut.status is null
8844: and jut.terr_qual_id71 is not null
8845: and jut.QUAL71_VALUE_ID is not null
8855: QUAL72_VALUE2 qual_VALUE2,
8856: QUAL72_VALUE3 qual_VALUE3, ORG_ID,
8857: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8858: CREATED_BY, CREATION_DATE
8859: FROM JTY_WEBADI_OTH_TERR_INTF jut
8860: where jut.USER_SEQUENCE = v_user_sequence
8861: and jut.status is null
8862: and jut.terr_qual_id72 is not null
8863: and jut.QUAL72_VALUE_ID is not null
8873: QUAL73_VALUE2 qual_VALUE2,
8874: QUAL73_VALUE3 qual_VALUE3, ORG_ID,
8875: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8876: CREATED_BY, CREATION_DATE
8877: FROM JTY_WEBADI_OTH_TERR_INTF jut
8878: where jut.USER_SEQUENCE = v_user_sequence
8879: and jut.status is null
8880: and jut.terr_qual_id73 is not null
8881: and jut.QUAL73_VALUE_ID is not null
8891: QUAL74_VALUE2 qual_VALUE2,
8892: QUAL74_VALUE3 qual_VALUE3, ORG_ID,
8893: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8894: CREATED_BY, CREATION_DATE
8895: FROM JTY_WEBADI_OTH_TERR_INTF jut
8896: where jut.USER_SEQUENCE = v_user_sequence
8897: and jut.status is null
8898: and jut.terr_qual_id74 is not null
8899: and jut.QUAL74_VALUE_ID is not null
8909: QUAL75_VALUE2 qual_valUE2,
8910: QUAL75_VALUE3 qual_valUE3, ORG_ID,
8911: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,
8912: CREATED_BY, CREATION_DATE
8913: FROM JTY_WEBADI_OTH_TERR_INTF jut
8914: where jut.USER_SEQUENCE = v_user_sequence
8915: and jut.status is null
8916: and jut.terr_qual_id75 is not null
8917: and jut.QUAL75_VALUE_ID is not null
8933: from (
8934: select terr_id, user_sequence,
8935: terr_qual_id1 terr_qual_id,
8936: 1 qual_num, QUAL1_VALUE_ID qual_value_id
8937: FROM JTY_WEBADI_OTH_TERR_INTF jut
8938: where jut.USER_SEQUENCE = v_user_sequence
8939: and jut.status is null
8940: and jut.terr_qual_id1 is not null
8941: and jut.QUAL1_VALUE_ID is not null
8946: union all
8947: select terr_id, user_sequence,
8948: terr_qual_id2 terr_qual_id,
8949: 2 qual_num, QUAL2_VALUE_ID qual_value_id
8950: FROM JTY_WEBADI_OTH_TERR_INTF jut
8951: where jut.USER_SEQUENCE = v_user_sequence
8952: and jut.status is null
8953: and jut.terr_qual_id2 is not null
8954: and jut.QUAL2_VALUE_ID is not null
8959: union all
8960: select terr_id, user_sequence,
8961: terr_qual_id3 terr_qual_id,
8962: 3 qual_num, QUAL3_VALUE_ID qual_value_id
8963: FROM JTY_WEBADI_OTH_TERR_INTF jut
8964: where jut.USER_SEQUENCE = v_user_sequence
8965: and jut.status is null
8966: and jut.terr_qual_id3 is not null
8967: and jut.QUAL3_VALUE_ID is not null
8972: union all
8973: select terr_id, user_sequence,
8974: terr_qual_id4 terr_qual_id,
8975: 4 qual_num, QUAL4_VALUE_ID qual_value_id
8976: FROM JTY_WEBADI_OTH_TERR_INTF jut
8977: where jut.USER_SEQUENCE = v_user_sequence
8978: and jut.status is null
8979: and jut.terr_qual_id4 is not null
8980: and jut.QUAL4_VALUE_ID is not null
8985: union all
8986: select terr_id, user_sequence,
8987: terr_qual_id5 terr_qual_id,
8988: 5 qual_num, QUAL5_VALUE_ID qual_value_id
8989: FROM JTY_WEBADI_OTH_TERR_INTF jut
8990: where jut.USER_SEQUENCE = v_user_sequence
8991: and jut.status is null
8992: and jut.terr_qual_id5 is not null
8993: and jut.QUAL5_VALUE_ID is not null
8998: union all
8999: select terr_id, user_sequence,
9000: terr_qual_id6 terr_qual_id,
9001: 6 qual_num, QUAL6_VALUE_ID qual_value_id
9002: FROM JTY_WEBADI_OTH_TERR_INTF jut
9003: where jut.USER_SEQUENCE = v_user_sequence
9004: and jut.status is null
9005: and jut.terr_qual_id6 is not null
9006: and jut.QUAL6_VALUE_ID is not null
9011: union all
9012: select terr_id, user_sequence,
9013: terr_qual_id7 terr_qual_id,
9014: 7 qual_num, QUAL7_VALUE_ID qual_value_id
9015: FROM JTY_WEBADI_OTH_TERR_INTF jut
9016: where jut.USER_SEQUENCE = v_user_sequence
9017: and jut.status is null
9018: and jut.terr_qual_id7 is not null
9019: and jut.QUAL7_VALUE_ID is not null
9024: union all
9025: select terr_id, user_sequence,
9026: terr_qual_id8 terr_qual_id,
9027: 8 qual_num, QUAL8_VALUE_ID qual_value_id
9028: FROM JTY_WEBADI_OTH_TERR_INTF jut
9029: where jut.USER_SEQUENCE = v_user_sequence
9030: and jut.status is null
9031: and jut.terr_qual_id8 is not null
9032: and jut.QUAL8_VALUE_ID is not null
9037: union all
9038: select terr_id, user_sequence,
9039: terr_qual_id9 terr_qual_id,
9040: 9 qual_num, QUAL9_VALUE_ID qual_value_id
9041: FROM JTY_WEBADI_OTH_TERR_INTF jut
9042: where jut.USER_SEQUENCE = v_user_sequence
9043: and jut.status is null
9044: and jut.terr_qual_id9 is not null
9045: and jut.QUAL9_VALUE_ID is not null
9050: union all
9051: select terr_id, user_sequence,
9052: terr_qual_id10 terr_qual_id,
9053: 10 qual_num, QUAL10_VALUE_ID qual_value_id
9054: FROM JTY_WEBADI_OTH_TERR_INTF jut
9055: where jut.USER_SEQUENCE = v_user_sequence
9056: and jut.status is null
9057: and jut.terr_qual_id10 is not null
9058: and jut.QUAL10_VALUE_ID is not null
9063: union all
9064: select terr_id, user_sequence,
9065: terr_qual_id11 terr_qual_id,
9066: 11 qual_num, QUAL11_VALUE_ID qual_value_id
9067: FROM JTY_WEBADI_OTH_TERR_INTF jut
9068: where jut.USER_SEQUENCE = v_user_sequence
9069: and jut.status is null
9070: and jut.terr_qual_id11 is not null
9071: and jut.QUAL11_VALUE_ID is not null
9076: union all
9077: select terr_id, user_sequence,
9078: terr_qual_id12 terr_qual_id,
9079: 12 qual_num, QUAL12_VALUE_ID qual_value_id
9080: FROM JTY_WEBADI_OTH_TERR_INTF jut
9081: where jut.USER_SEQUENCE = v_user_sequence
9082: and jut.status is null
9083: and jut.terr_qual_id12 is not null
9084: and jut.QUAL12_VALUE_ID is not null
9089: union all
9090: select terr_id, user_sequence,
9091: terr_qual_id13 terr_qual_id,
9092: 13 qual_num, QUAL13_VALUE_ID qual_value_id
9093: FROM JTY_WEBADI_OTH_TERR_INTF jut
9094: where jut.USER_SEQUENCE = v_user_sequence
9095: and jut.status is null
9096: and jut.terr_qual_id13 is not null
9097: and jut.QUAL13_VALUE_ID is not null
9102: union all
9103: select terr_id, user_sequence,
9104: terr_qual_id14 terr_qual_id,
9105: 14 qual_num, QUAL14_VALUE_ID qual_value_id
9106: FROM JTY_WEBADI_OTH_TERR_INTF jut
9107: where jut.USER_SEQUENCE = v_user_sequence
9108: and jut.status is null
9109: and jut.terr_qual_id14 is not null
9110: and jut.QUAL14_VALUE_ID is not null
9115: union all
9116: select terr_id, user_sequence,
9117: terr_qual_id15 terr_qual_id,
9118: 15 qual_num, QUAL15_VALUE_ID qual_value_id
9119: FROM JTY_WEBADI_OTH_TERR_INTF jut
9120: where jut.USER_SEQUENCE = v_user_sequence
9121: and jut.status is null
9122: and jut.terr_qual_id15 is not null
9123: and jut.QUAL15_VALUE_ID is not null
9128: union all
9129: select terr_id, user_sequence,
9130: terr_qual_id16 terr_qual_id,
9131: 16 qual_num, QUAL16_VALUE_ID qual_value_id
9132: FROM JTY_WEBADI_OTH_TERR_INTF jut
9133: where jut.USER_SEQUENCE = v_user_sequence
9134: and jut.status is null
9135: and jut.terr_qual_id16 is not null
9136: and jut.QUAL16_VALUE_ID is not null
9141: union all
9142: select terr_id, user_sequence,
9143: terr_qual_id17 terr_qual_id,
9144: 17 qual_num, QUAL17_VALUE_ID qual_value_id
9145: FROM JTY_WEBADI_OTH_TERR_INTF jut
9146: where jut.USER_SEQUENCE = v_user_sequence
9147: and jut.status is null
9148: and jut.terr_qual_id17 is not null
9149: and jut.QUAL17_VALUE_ID is not null
9154: union all
9155: select terr_id, user_sequence,
9156: terr_qual_id18 terr_qual_id,
9157: 18 qual_num, QUAL18_VALUE_ID qual_value_id
9158: FROM JTY_WEBADI_OTH_TERR_INTF jut
9159: where jut.USER_SEQUENCE = v_user_sequence
9160: and jut.status is null
9161: and jut.terr_qual_id18 is not null
9162: and jut.QUAL18_VALUE_ID is not null
9167: union all
9168: select terr_id, user_sequence,
9169: terr_qual_id19 terr_qual_id,
9170: 19 qual_num, QUAL19_VALUE_ID qual_value_id
9171: FROM JTY_WEBADI_OTH_TERR_INTF jut
9172: where jut.USER_SEQUENCE = v_user_sequence
9173: and jut.status is null
9174: and jut.terr_qual_id19 is not null
9175: and jut.QUAL19_VALUE_ID is not null
9180: union all
9181: select terr_id, user_sequence,
9182: terr_qual_id20 terr_qual_id,
9183: 20 qual_num, QUAL20_VALUE_ID qual_value_id
9184: FROM JTY_WEBADI_OTH_TERR_INTF jut
9185: where jut.USER_SEQUENCE = v_user_sequence
9186: and jut.status is null
9187: and jut.terr_qual_id20 is not null
9188: and jut.QUAL20_VALUE_ID is not null
9193: union all
9194: select terr_id, user_sequence,
9195: terr_qual_id21 terr_qual_id,
9196: 21 qual_num, QUAL21_VALUE_ID qual_value_id
9197: FROM JTY_WEBADI_OTH_TERR_INTF jut
9198: where jut.USER_SEQUENCE = v_user_sequence
9199: and jut.status is null
9200: and jut.terr_qual_id21 is not null
9201: and jut.QUAL21_VALUE_ID is not null
9206: union all
9207: select terr_id, user_sequence,
9208: terr_qual_id22 terr_qual_id,
9209: 22 qual_num, QUAL22_VALUE_ID qual_value_id
9210: FROM JTY_WEBADI_OTH_TERR_INTF jut
9211: where jut.USER_SEQUENCE = v_user_sequence
9212: and jut.status is null
9213: and jut.terr_qual_id22 is not null
9214: and jut.QUAL22_VALUE_ID is not null
9219: union all
9220: select terr_id, user_sequence,
9221: terr_qual_id23 terr_qual_id,
9222: 23 qual_num, QUAL23_VALUE_ID qual_value_id
9223: FROM JTY_WEBADI_OTH_TERR_INTF jut
9224: where jut.USER_SEQUENCE = v_user_sequence
9225: and jut.status is null
9226: and jut.terr_qual_id23 is not null
9227: and jut.QUAL23_VALUE_ID is not null
9232: union all
9233: select terr_id, user_sequence,
9234: terr_qual_id24 terr_qual_id,
9235: 24 qual_num, QUAL24_VALUE_ID qual_value_id
9236: FROM JTY_WEBADI_OTH_TERR_INTF jut
9237: where jut.USER_SEQUENCE = v_user_sequence
9238: and jut.status is null
9239: and jut.terr_qual_id24 is not null
9240: and jut.QUAL24_VALUE_ID is not null
9245: union all
9246: select terr_id, user_sequence,
9247: terr_qual_id25 terr_qual_id,
9248: 25 qual_num, QUAL25_VALUE_ID qual_value_id
9249: FROM JTY_WEBADI_OTH_TERR_INTF jut
9250: where jut.USER_SEQUENCE = v_user_sequence
9251: and jut.status is null
9252: and jut.terr_qual_id25 is not null
9253: and jut.QUAL25_VALUE_ID is not null
9258: union all
9259: select terr_id, user_sequence,
9260: terr_qual_id26 terr_qual_id,
9261: 26 qual_num, QUAL26_VALUE_ID qual_value_id
9262: FROM JTY_WEBADI_OTH_TERR_INTF jut
9263: where jut.USER_SEQUENCE = v_user_sequence
9264: and jut.status is null
9265: and jut.terr_qual_id26 is not null
9266: and jut.QUAL26_VALUE_ID is not null
9271: union all
9272: select terr_id, user_sequence,
9273: terr_qual_id27 terr_qual_id,
9274: 27 qual_num, QUAL27_VALUE_ID qual_value_id
9275: FROM JTY_WEBADI_OTH_TERR_INTF jut
9276: where jut.USER_SEQUENCE = v_user_sequence
9277: and jut.status is null
9278: and jut.terr_qual_id27 is not null
9279: and jut.QUAL27_VALUE_ID is not null
9284: union all
9285: select terr_id, user_sequence,
9286: terr_qual_id28 terr_qual_id,
9287: 28 qual_num, QUAL28_VALUE_ID qual_value_id
9288: FROM JTY_WEBADI_OTH_TERR_INTF jut
9289: where jut.USER_SEQUENCE = v_user_sequence
9290: and jut.status is null
9291: and jut.terr_qual_id28 is not null
9292: and jut.QUAL28_VALUE_ID is not null
9297: union all
9298: select terr_id, user_sequence,
9299: terr_qual_id29 terr_qual_id,
9300: 29 qual_num, QUAL29_VALUE_ID qual_value_id
9301: FROM JTY_WEBADI_OTH_TERR_INTF jut
9302: where jut.USER_SEQUENCE = v_user_sequence
9303: and jut.status is null
9304: and jut.terr_qual_id29 is not null
9305: and jut.QUAL29_VALUE_ID is not null
9310: union all
9311: select terr_id, user_sequence,
9312: terr_qual_id30 terr_qual_id,
9313: 30 qual_num, QUAL30_VALUE_ID qual_value_id
9314: FROM JTY_WEBADI_OTH_TERR_INTF jut
9315: where jut.USER_SEQUENCE = v_user_sequence
9316: and jut.status is null
9317: and jut.terr_qual_id30 is not null
9318: and jut.QUAL30_VALUE_ID is not null
9323: union all
9324: select terr_id, user_sequence,
9325: terr_qual_id31 terr_qual_id,
9326: 31 qual_num, QUAL31_VALUE_ID qual_value_id
9327: FROM JTY_WEBADI_OTH_TERR_INTF jut
9328: where jut.USER_SEQUENCE = v_user_sequence
9329: and jut.status is null
9330: and jut.terr_qual_id31 is not null
9331: and jut.QUAL31_VALUE_ID is not null
9336: union all
9337: select terr_id, user_sequence,
9338: terr_qual_id32 terr_qual_id,
9339: 32 qual_num, QUAL32_VALUE_ID qual_value_id
9340: FROM JTY_WEBADI_OTH_TERR_INTF jut
9341: where jut.USER_SEQUENCE = v_user_sequence
9342: and jut.status is null
9343: and jut.terr_qual_id32 is not null
9344: and jut.QUAL32_VALUE_ID is not null
9349: union all
9350: select terr_id, user_sequence,
9351: terr_qual_id33 terr_qual_id,
9352: 33 qual_num, QUAL33_VALUE_ID qual_value_id
9353: FROM JTY_WEBADI_OTH_TERR_INTF jut
9354: where jut.USER_SEQUENCE = v_user_sequence
9355: and jut.status is null
9356: and jut.terr_qual_id33 is not null
9357: and jut.QUAL33_VALUE_ID is not null
9362: union all
9363: select terr_id, user_sequence,
9364: terr_qual_id34 terr_qual_id,
9365: 34 qual_num, QUAL34_VALUE_ID qual_value_id
9366: FROM JTY_WEBADI_OTH_TERR_INTF jut
9367: where jut.USER_SEQUENCE = v_user_sequence
9368: and jut.status is null
9369: and jut.terr_qual_id34 is not null
9370: and jut.QUAL34_VALUE_ID is not null
9375: union all
9376: select terr_id, user_sequence,
9377: terr_qual_id35 terr_qual_id,
9378: 35 qual_num, QUAL35_VALUE_ID qual_value_id
9379: FROM JTY_WEBADI_OTH_TERR_INTF jut
9380: where jut.USER_SEQUENCE = v_user_sequence
9381: and jut.status is null
9382: and jut.terr_qual_id35 is not null
9383: and jut.QUAL35_VALUE_ID is not null
9388: union all
9389: select terr_id, user_sequence,
9390: terr_qual_id36 terr_qual_id,
9391: 36 qual_num, QUAL36_VALUE_ID qual_value_id
9392: FROM JTY_WEBADI_OTH_TERR_INTF jut
9393: where jut.USER_SEQUENCE = v_user_sequence
9394: and jut.status is null
9395: and jut.terr_qual_id36 is not null
9396: and jut.QUAL36_VALUE_ID is not null
9401: union all
9402: select terr_id, user_sequence,
9403: terr_qual_id37 terr_qual_id,
9404: 37 qual_num, QUAL37_VALUE_ID qual_value_id
9405: FROM JTY_WEBADI_OTH_TERR_INTF jut
9406: where jut.USER_SEQUENCE = v_user_sequence
9407: and jut.status is null
9408: and jut.terr_qual_id37 is not null
9409: and jut.QUAL37_VALUE_ID is not null
9414: union all
9415: select terr_id, user_sequence,
9416: terr_qual_id38 terr_qual_id,
9417: 38 qual_num, QUAL38_VALUE_ID qual_value_id
9418: FROM JTY_WEBADI_OTH_TERR_INTF jut
9419: where jut.USER_SEQUENCE = v_user_sequence
9420: and jut.status is null
9421: and jut.terr_qual_id38 is not null
9422: and jut.QUAL38_VALUE_ID is not null
9427: union all
9428: select terr_id, user_sequence,
9429: terr_qual_id39 terr_qual_id,
9430: 39 qual_num, QUAL39_VALUE_ID qual_value_id
9431: FROM JTY_WEBADI_OTH_TERR_INTF jut
9432: where jut.USER_SEQUENCE = v_user_sequence
9433: and jut.status is null
9434: and jut.terr_qual_id39 is not null
9435: and jut.QUAL39_VALUE_ID is not null
9440: union all
9441: select terr_id, user_sequence,
9442: terr_qual_id40 terr_qual_id,
9443: 40 qual_num, QUAL40_VALUE_ID qual_value_id
9444: FROM JTY_WEBADI_OTH_TERR_INTF jut
9445: where jut.USER_SEQUENCE = v_user_sequence
9446: and jut.status is null
9447: and jut.terr_qual_id40 is not null
9448: and jut.QUAL40_VALUE_ID is not null
9453: union all
9454: select terr_id, user_sequence,
9455: terr_qual_id41 terr_qual_id,
9456: 41 qual_num, QUAL41_VALUE_ID qual_value_id
9457: FROM JTY_WEBADI_OTH_TERR_INTF jut
9458: where jut.USER_SEQUENCE = v_user_sequence
9459: and jut.status is null
9460: and jut.terr_qual_id41 is not null
9461: and jut.QUAL41_VALUE_ID is not null
9466: union all
9467: select terr_id, user_sequence,
9468: terr_qual_id42 terr_qual_id,
9469: 42 qual_num, QUAL42_VALUE_ID qual_value_id
9470: FROM JTY_WEBADI_OTH_TERR_INTF jut
9471: where jut.USER_SEQUENCE = v_user_sequence
9472: and jut.status is null
9473: and jut.terr_qual_id42 is not null
9474: and jut.QUAL42_VALUE_ID is not null
9479: union all
9480: select terr_id, user_sequence,
9481: terr_qual_id43 terr_qual_id,
9482: 43 qual_num, QUAL43_VALUE_ID qual_value_id
9483: FROM JTY_WEBADI_OTH_TERR_INTF jut
9484: where jut.USER_SEQUENCE = v_user_sequence
9485: and jut.status is null
9486: and jut.terr_qual_id43 is not null
9487: and jut.QUAL43_VALUE_ID is not null
9492: union all
9493: select terr_id, user_sequence,
9494: terr_qual_id44 terr_qual_id,
9495: 44 qual_num, QUAL44_VALUE_ID qual_value_id
9496: FROM JTY_WEBADI_OTH_TERR_INTF jut
9497: where jut.USER_SEQUENCE = v_user_sequence
9498: and jut.status is null
9499: and jut.terr_qual_id44 is not null
9500: and jut.QUAL44_VALUE_ID is not null
9505: union all
9506: select terr_id, user_sequence,
9507: terr_qual_id45 terr_qual_id,
9508: 45 qual_num, QUAL45_VALUE_ID qual_value_id
9509: FROM JTY_WEBADI_OTH_TERR_INTF jut
9510: where jut.USER_SEQUENCE = v_user_sequence
9511: and jut.status is null
9512: and jut.terr_qual_id45 is not null
9513: and jut.QUAL45_VALUE_ID is not null
9518: union all
9519: select terr_id, user_sequence,
9520: terr_qual_id46 terr_qual_id,
9521: 46 qual_num, QUAL46_VALUE_ID qual_value_id
9522: FROM JTY_WEBADI_OTH_TERR_INTF jut
9523: where jut.USER_SEQUENCE = v_user_sequence
9524: and jut.status is null
9525: and jut.terr_qual_id46 is not null
9526: and jut.QUAL46_VALUE_ID is not null
9531: union all
9532: select terr_id, user_sequence,
9533: terr_qual_id47 terr_qual_id,
9534: 47 qual_num, QUAL47_VALUE_ID qual_value_id
9535: FROM JTY_WEBADI_OTH_TERR_INTF jut
9536: where jut.USER_SEQUENCE = v_user_sequence
9537: and jut.status is null
9538: and jut.terr_qual_id47 is not null
9539: and jut.QUAL47_VALUE_ID is not null
9544: union all
9545: select terr_id, user_sequence,
9546: terr_qual_id48 terr_qual_id,
9547: 48 qual_num, QUAL48_VALUE_ID qual_value_id
9548: FROM JTY_WEBADI_OTH_TERR_INTF jut
9549: where jut.USER_SEQUENCE = v_user_sequence
9550: and jut.status is null
9551: and jut.terr_qual_id48 is not null
9552: and jut.QUAL48_VALUE_ID is not null
9557: union all
9558: select terr_id, user_sequence,
9559: terr_qual_id49 terr_qual_id,
9560: 49 qual_num, QUAL49_VALUE_ID qual_value_id
9561: FROM JTY_WEBADI_OTH_TERR_INTF jut
9562: where jut.USER_SEQUENCE = v_user_sequence
9563: and jut.status is null
9564: and jut.terr_qual_id49 is not null
9565: and jut.QUAL49_VALUE_ID is not null
9570: union all
9571: select terr_id, user_sequence,
9572: terr_qual_id50 terr_qual_id,
9573: 50 qual_num, QUAL50_VALUE_ID qual_value_id
9574: FROM JTY_WEBADI_OTH_TERR_INTF jut
9575: where jut.USER_SEQUENCE = v_user_sequence
9576: and jut.status is null
9577: and jut.terr_qual_id50 is not null
9578: and jut.QUAL50_VALUE_ID is not null
9583: union all
9584: select terr_id, user_sequence,
9585: terr_qual_id51 terr_qual_id,
9586: 51 qual_num, QUAL51_VALUE_ID qual_value_id
9587: FROM JTY_WEBADI_OTH_TERR_INTF jut
9588: where jut.USER_SEQUENCE = v_user_sequence
9589: and jut.status is null
9590: and jut.terr_qual_id51 is not null
9591: and jut.QUAL51_VALUE_ID is not null
9596: union all
9597: select terr_id, user_sequence,
9598: terr_qual_id52 terr_qual_id,
9599: 52 qual_num, QUAL52_VALUE_ID qual_value_id
9600: FROM JTY_WEBADI_OTH_TERR_INTF jut
9601: where jut.USER_SEQUENCE = v_user_sequence
9602: and jut.status is null
9603: and jut.terr_qual_id52 is not null
9604: and jut.QUAL52_VALUE_ID is not null
9609: union all
9610: select terr_id, user_sequence,
9611: terr_qual_id53 terr_qual_id,
9612: 53 qual_num, QUAL53_VALUE_ID qual_value_id
9613: FROM JTY_WEBADI_OTH_TERR_INTF jut
9614: where jut.USER_SEQUENCE = v_user_sequence
9615: and jut.status is null
9616: and jut.terr_qual_id53 is not null
9617: and jut.QUAL53_VALUE_ID is not null
9622: union all
9623: select terr_id, user_sequence,
9624: terr_qual_id54 terr_qual_id,
9625: 54 qual_num, QUAL54_VALUE_ID qual_value_id
9626: FROM JTY_WEBADI_OTH_TERR_INTF jut
9627: where jut.USER_SEQUENCE = v_user_sequence
9628: and jut.status is null
9629: and jut.terr_qual_id54 is not null
9630: and jut.QUAL54_VALUE_ID is not null
9635: union all
9636: select terr_id, user_sequence,
9637: terr_qual_id55 terr_qual_id,
9638: 55 qual_num, QUAL55_VALUE_ID qual_value_id
9639: FROM JTY_WEBADI_OTH_TERR_INTF jut
9640: where jut.USER_SEQUENCE = v_user_sequence
9641: and jut.status is null
9642: and jut.terr_qual_id55 is not null
9643: and jut.QUAL55_VALUE_ID is not null
9648: union all
9649: select terr_id, user_sequence,
9650: terr_qual_id56 terr_qual_id,
9651: 56 qual_num, QUAL56_VALUE_ID qual_value_id
9652: FROM JTY_WEBADI_OTH_TERR_INTF jut
9653: where jut.USER_SEQUENCE = v_user_sequence
9654: and jut.status is null
9655: and jut.terr_qual_id56 is not null
9656: and jut.QUAL56_VALUE_ID is not null
9661: union all
9662: select terr_id, user_sequence,
9663: terr_qual_id57 terr_qual_id,
9664: 57 qual_num, QUAL57_VALUE_ID qual_value_id
9665: FROM JTY_WEBADI_OTH_TERR_INTF jut
9666: where jut.USER_SEQUENCE = v_user_sequence
9667: and jut.status is null
9668: and jut.terr_qual_id57 is not null
9669: and jut.QUAL57_VALUE_ID is not null
9674: union all
9675: select terr_id, user_sequence,
9676: terr_qual_id58 terr_qual_id,
9677: 58 qual_num, QUAL58_VALUE_ID qual_value_id
9678: FROM JTY_WEBADI_OTH_TERR_INTF jut
9679: where jut.USER_SEQUENCE = v_user_sequence
9680: and jut.status is null
9681: and jut.terr_qual_id58 is not null
9682: and jut.QUAL58_VALUE_ID is not null
9687: union all
9688: select terr_id, user_sequence,
9689: terr_qual_id59 terr_qual_id,
9690: 59 qual_num, QUAL59_VALUE_ID qual_value_id
9691: FROM JTY_WEBADI_OTH_TERR_INTF jut
9692: where jut.USER_SEQUENCE = v_user_sequence
9693: and jut.status is null
9694: and jut.terr_qual_id59 is not null
9695: and jut.QUAL59_VALUE_ID is not null
9700: union all
9701: select terr_id, user_sequence,
9702: terr_qual_id60 terr_qual_id,
9703: 60 qual_num, QUAL60_VALUE_ID qual_value_id
9704: FROM JTY_WEBADI_OTH_TERR_INTF jut
9705: where jut.USER_SEQUENCE = v_user_sequence
9706: and jut.status is null
9707: and jut.terr_qual_id60 is not null
9708: and jut.QUAL60_VALUE_ID is not null
9713: union all
9714: select terr_id, user_sequence,
9715: terr_qual_id61 terr_qual_id,
9716: 61 qual_num, QUAL61_VALUE_ID qual_value_id
9717: FROM JTY_WEBADI_OTH_TERR_INTF jut
9718: where jut.USER_SEQUENCE = v_user_sequence
9719: and jut.status is null
9720: and jut.terr_qual_id61 is not null
9721: and jut.QUAL61_VALUE_ID is not null
9726: union all
9727: select terr_id, user_sequence,
9728: terr_qual_id62 terr_qual_id,
9729: 62 qual_num, QUAL62_VALUE_ID qual_value_id
9730: FROM JTY_WEBADI_OTH_TERR_INTF jut
9731: where jut.USER_SEQUENCE = v_user_sequence
9732: and jut.status is null
9733: and jut.terr_qual_id62 is not null
9734: and jut.QUAL62_VALUE_ID is not null
9739: union all
9740: select terr_id, user_sequence,
9741: terr_qual_id63 terr_qual_id,
9742: 63 qual_num, QUAL63_VALUE_ID qual_value_id
9743: FROM JTY_WEBADI_OTH_TERR_INTF jut
9744: where jut.USER_SEQUENCE = v_user_sequence
9745: and jut.status is null
9746: and jut.terr_qual_id63 is not null
9747: and jut.QUAL63_VALUE_ID is not null
9752: union all
9753: select terr_id, user_sequence,
9754: terr_qual_id64 terr_qual_id,
9755: 64 qual_num, QUAL64_VALUE_ID qual_value_id
9756: FROM JTY_WEBADI_OTH_TERR_INTF jut
9757: where jut.USER_SEQUENCE = v_user_sequence
9758: and jut.status is null
9759: and jut.terr_qual_id64 is not null
9760: and jut.QUAL64_VALUE_ID is not null
9765: union all
9766: select terr_id, user_sequence,
9767: terr_qual_id65 terr_qual_id,
9768: 65 qual_num, QUAL65_VALUE_ID qual_value_id
9769: FROM JTY_WEBADI_OTH_TERR_INTF jut
9770: where jut.USER_SEQUENCE = v_user_sequence
9771: and jut.status is null
9772: and jut.terr_qual_id65 is not null
9773: and jut.QUAL65_VALUE_ID is not null
9778: union all
9779: select terr_id, user_sequence,
9780: terr_qual_id66 terr_qual_id,
9781: 66 qual_num, QUAL66_VALUE_ID qual_value_id
9782: FROM JTY_WEBADI_OTH_TERR_INTF jut
9783: where jut.USER_SEQUENCE = v_user_sequence
9784: and jut.status is null
9785: and jut.terr_qual_id66 is not null
9786: and jut.QUAL66_VALUE_ID is not null
9791: union all
9792: select terr_id, user_sequence,
9793: terr_qual_id67 terr_qual_id,
9794: 67 qual_num, QUAL67_VALUE_ID qual_value_id
9795: FROM JTY_WEBADI_OTH_TERR_INTF jut
9796: where jut.USER_SEQUENCE = v_user_sequence
9797: and jut.status is null
9798: and jut.terr_qual_id67 is not null
9799: and jut.QUAL67_VALUE_ID is not null
9804: union all
9805: select terr_id, user_sequence,
9806: terr_qual_id68 terr_qual_id,
9807: 68 qual_num, QUAL68_VALUE_ID qual_value_id
9808: FROM JTY_WEBADI_OTH_TERR_INTF jut
9809: where jut.USER_SEQUENCE = v_user_sequence
9810: and jut.status is null
9811: and jut.terr_qual_id68 is not null
9812: and jut.QUAL68_VALUE_ID is not null
9817: union all
9818: select terr_id, user_sequence,
9819: terr_qual_id69 terr_qual_id,
9820: 69 qual_num, QUAL69_VALUE_ID qual_value_id
9821: FROM JTY_WEBADI_OTH_TERR_INTF jut
9822: where jut.USER_SEQUENCE = v_user_sequence
9823: and jut.status is null
9824: and jut.terr_qual_id69 is not null
9825: and jut.QUAL69_VALUE_ID is not null
9830: union all
9831: select terr_id, user_sequence,
9832: terr_qual_id70 terr_qual_id,
9833: 70 qual_num, QUAL70_VALUE_ID qual_value_id
9834: FROM JTY_WEBADI_OTH_TERR_INTF jut
9835: where jut.USER_SEQUENCE = v_user_sequence
9836: and jut.status is null
9837: and jut.terr_qual_id70 is not null
9838: and jut.QUAL70_VALUE_ID is not null
9843: union all
9844: select terr_id, user_sequence,
9845: terr_qual_id71 terr_qual_id,
9846: 71 qual_num, QUAL71_VALUE_ID qual_value_id
9847: FROM JTY_WEBADI_OTH_TERR_INTF jut
9848: where jut.USER_SEQUENCE = v_user_sequence
9849: and jut.status is null
9850: and jut.terr_qual_id71 is not null
9851: and jut.QUAL71_VALUE_ID is not null
9856: union all
9857: select terr_id, user_sequence,
9858: terr_qual_id72 terr_qual_id,
9859: 72 qual_num, QUAL72_VALUE_ID qual_value_id
9860: FROM JTY_WEBADI_OTH_TERR_INTF jut
9861: where jut.USER_SEQUENCE = v_user_sequence
9862: and jut.status is null
9863: and jut.terr_qual_id72 is not null
9864: and jut.QUAL72_VALUE_ID is not null
9869: union all
9870: select terr_id, user_sequence,
9871: terr_qual_id73 terr_qual_id,
9872: 73 qual_num, QUAL73_VALUE_ID qual_value_id
9873: FROM JTY_WEBADI_OTH_TERR_INTF jut
9874: where jut.USER_SEQUENCE = v_user_sequence
9875: and jut.status is null
9876: and jut.terr_qual_id73 is not null
9877: and jut.QUAL73_VALUE_ID is not null
9882: union all
9883: select terr_id, user_sequence,
9884: terr_qual_id74 terr_qual_id,
9885: 74 qual_num, QUAL74_VALUE_ID qual_value_id
9886: FROM JTY_WEBADI_OTH_TERR_INTF jut
9887: where jut.USER_SEQUENCE = v_user_sequence
9888: and jut.status is null
9889: and jut.terr_qual_id74 is not null
9890: and jut.QUAL74_VALUE_ID is not null
9895: union all
9896: select terr_id, user_sequence,
9897: terr_qual_id75 terr_qual_id,
9898: 75 qual_num, QUAL75_VALUE_ID qual_value_id
9899: FROM JTY_WEBADI_OTH_TERR_INTF jut
9900: where jut.USER_SEQUENCE = v_user_sequence
9901: and jut.status is null
9902: and jut.terr_qual_id75 is not null
9903: and jut.QUAL75_VALUE_ID is not null
9956: debugmsg('UPDATE_TERR_DEF: INSERT_TERR_VALUES : After completion x_msg_data : ' || x_msg_data);
9957: end if;
9958: debugmsg('UPDATE_TERR_DEF: Update Terr qual id : ');
9959: forall i in l_Terr_Qual_Rec.TERR_ID.first..l_Terr_Qual_Rec.TERR_ID.last
9960: UPDATE JTY_WEBADI_OTH_TERR_INTF jwot
9961: set
9962: jwot.terr_qual_id1 = decode(l_Terr_Qual_Rec.qualifier_num(i),1,l_Terr_Qual_Rec.TERR_QUAL_ID(i),jwot.terr_qual_id1),
9963: jwot.terr_qual_id2 = decode(l_Terr_Qual_Rec.qualifier_num(i),2,l_Terr_Qual_Rec.TERR_QUAL_ID(i),jwot.terr_qual_id2),
9964: jwot.terr_qual_id3 = decode(l_Terr_Qual_Rec.qualifier_num(i),3,l_Terr_Qual_Rec.TERR_QUAL_ID(i),jwot.terr_qual_id3),
10040: and interface_type = l_intf_type;
10041:
10042: if x_return_status = FND_API.G_RET_STS_ERROR then
10043: forall i in l_Terr_Qual_Rec.TERR_QUAL_ID.first..l_Terr_Qual_Rec.TERR_QUAL_ID.last
10044: UPDATE JTY_WEBADI_OTH_TERR_INTF jwot
10045: SET STATUS = x_return_status,
10046: ERROR_MSG = x_msg_data
10047: WHERE l_Terr_Qual_Rec.TERR_QUAL_ID(i) in
10048: ( jwot.TERR_QUAL_ID1, jwot.TERR_QUAL_ID2, jwot.TERR_QUAL_ID3,
10112: x_msg_data => x_msg_data);
10113: end if;
10114:
10115: forall i in l_Terr_Qual_Rec.TERR_ID.first..l_Terr_Qual_Rec.TERR_ID.last
10116: UPDATE JTY_WEBADI_OTH_TERR_INTF jwot
10117: set
10118: jwot.terr_qual_id1 = decode(l_Terr_Qual_Rec.qualifier_num(i),1,l_Terr_Qual_Rec.TERR_QUAL_ID(i),jwot.terr_qual_id1),
10119: jwot.terr_qual_id2 = decode(l_Terr_Qual_Rec.qualifier_num(i),2,l_Terr_Qual_Rec.TERR_QUAL_ID(i),jwot.terr_qual_id2),
10120: jwot.terr_qual_id3 = decode(l_Terr_Qual_Rec.qualifier_num(i),3,l_Terr_Qual_Rec.TERR_QUAL_ID(i),jwot.terr_qual_id3),
10196: and interface_type = l_intf_type;
10197:
10198: if x_return_status = FND_API.G_RET_STS_ERROR then
10199: forall i in l_Terr_Qual_Rec.TERR_QUAL_ID.first..l_Terr_Qual_Rec.TERR_QUAL_ID.last
10200: UPDATE JTY_WEBADI_OTH_TERR_INTF jwot
10201: SET STATUS = x_return_status,
10202: ERROR_MSG = x_msg_data
10203: WHERE l_Terr_Qual_Rec.TERR_QUAL_ID(i) in
10204: ( jwot.TERR_QUAL_ID1, jwot.TERR_QUAL_ID2, jwot.TERR_QUAL_ID3,
10261: x_msg_data => x_msg_data);
10262: debugmsg('UPDATE_TERR_DEF: UPDATE_TERR_QUAL : get_c_terr_value_csr after : INSERT_TERR_VALUES : x_return_status ' || x_return_status );
10263: if x_return_status = FND_API.G_RET_STS_ERROR then
10264: forall i in l_Terr_Qual_Rec.TERR_QUAL_ID.first..l_Terr_Qual_Rec.TERR_QUAL_ID.last
10265: UPDATE JTY_WEBADI_OTH_TERR_INTF jwot
10266: SET STATUS = x_return_status,
10267: ERROR_MSG = x_msg_data
10268: WHERE l_Terr_Qual_Rec.TERR_QUAL_ID(i) in
10269: ( jwot.TERR_QUAL_ID1, jwot.TERR_QUAL_ID2, jwot.TERR_QUAL_ID3,
10455: fnd_message.set_name ('JTF', 'JTY_OTH_TERR_UPDATE_QUAL_VAL');
10456: X_Msg_Data := fnd_message.get();
10457:
10458: forall i in l_Terr_Qual_Rec.TERR_QUAL_ID.first..l_Terr_Qual_Rec.TERR_QUAL_ID.last
10459: UPDATE JTY_WEBADI_OTH_TERR_INTF jwot
10460: SET STATUS = x_return_status,
10461: error_msg = 'U: ' || x_msg_data
10462: WHERE l_Terr_Qual_Rec.TERR_QUAL_ID(i) in
10463: ( jwot.TERR_QUAL_ID1, jwot.TERR_QUAL_ID2, jwot.TERR_QUAL_ID3,
10519: and jtq.terr_qual_id = l_Terr_Qual_Rec.TERR_QUAL_ID(i);
10520: --dbms_output.put_line(' U: get_d_terr_value_csr:TV, actual row processed: '||SQL%ROWCOUNT);
10521:
10522: forall i in l_Terr_Qual_Rec.TERR_QUAL_ID.first..l_Terr_Qual_Rec.TERR_QUAL_ID.last
10523: UPDATE JTY_WEBADI_OTH_TERR_INTF jwot
10524: SET STATUS = x_return_status
10525: WHERE l_Terr_Qual_Rec.TERR_QUAL_ID(i) in
10526: ( jwot.TERR_QUAL_ID1, jwot.TERR_QUAL_ID2, jwot.TERR_QUAL_ID3,
10527: jwot.TERR_QUAL_ID4, jwot.TERR_QUAL_ID5, jwot.TERR_QUAL_ID6,
10564: fnd_message.set_name ('JTF', 'JTY_OTH_TERR_DELETE_QUAL_VAL');
10565: X_Msg_Data := fnd_message.get();
10566:
10567: forall i in l_Terr_Qual_Rec.TERR_QUAL_ID.first..l_Terr_Qual_Rec.TERR_QUAL_ID.last
10568: UPDATE JTY_WEBADI_OTH_TERR_INTF jwot
10569: SET STATUS = x_return_status,
10570: error_msg = 'U: ' || x_msg_data
10571: WHERE l_Terr_Qual_Rec.TERR_QUAL_ID(i) in
10572: ( jwot.TERR_QUAL_ID1, jwot.TERR_QUAL_ID2, jwot.TERR_QUAL_ID3,
10604: and user_sequence = p_user_sequence;
10605: END;
10606: end if; --get_d_terr_value_csr
10607:
10608: update JTY_WEBADI_OTH_TERR_INTF
10609: set status = x_return_status
10610: where interface_type = l_intf_type
10611: and header = l_header
10612: and status is null
10645: jwr.ATTRIBUTE9, jwr.ATTRIBUTE10, jwr.ATTRIBUTE11,
10646: jwr.ATTRIBUTE12, jwr.ATTRIBUTE13, jwr.ATTRIBUTE14,
10647: jwr.ATTRIBUTE15
10648: from
10649: JTY_WEBADI_OTH_TERR_INTF jwot,
10650: JTY_WEBADI_RESOURCES jwr,
10651: jtf_rs_resource_extns res
10652: where jwr.RESOURCE_ID = res.resource_id(+)
10653: and jwr.user_sequence = jwot.user_sequence
10669: jwot.CREATION_DATE, jwot.CREATED_BY, jwot.LAST_UPDATE_LOGIN,
10670: sub.TERR_RSC_ID, jq.QUAL_TYPE_NAME ACCESS_TYPE,
10671: jwot.ORG_ID, sub.TRANS_ACCESS_CODE
10672: from JTY_WEBADI_QUAL_TYPE_HEADER jq,
10673: JTY_WEBADI_OTH_TERR_INTF jwot,
10674: (
10675: select user_sequence, TERR_RSC_ID, lay_seq_num, header,
10676: 1 qual_type_num, TERR_RSC_ACCESS_ID1 TERR_RSC_ACCESS_ID,
10677: TRANS_ACCESS_CODE1 TRANS_ACCESS_CODE
10788: jwot.CREATION_DATE, jwot.CREATED_BY, jwot.LAST_UPDATE_LOGIN,
10789: sub.TERR_RSC_ID, jq.QUAL_TYPE_NAME ACCESS_TYPE,
10790: jwot.ORG_ID, sub.TRANS_ACCESS_CODE
10791: from JTY_WEBADI_QUAL_TYPE_HEADER jq,
10792: JTY_WEBADI_OTH_TERR_INTF jwot,
10793: (
10794: select user_sequence, TERR_RSC_ID, lay_seq_num, header,
10795: 1 qual_type_num, TERR_RSC_ACCESS_ID1 TERR_RSC_ACCESS_ID,
10796: TRANS_ACCESS_CODE1 TRANS_ACCESS_CODE
10966: v_header varchar2,
10967: v_action_flag varchar2) IS
10968: SELECT DISTINCT jwot.TERR_ID
10969: from
10970: JTY_WEBADI_OTH_TERR_INTF jwot,
10971: JTY_WEBADI_RESOURCES jwr,
10972: jtf_rs_resource_extns res
10973: where jwr.RESOURCE_ID = res.resource_id(+)
10974: and jwr.user_sequence = jwot.user_sequence
11159: l_rsc_access_rec.ORG_ID(i)
11160: );
11161:
11162: forall i in l_rsc_access_rec.TERR_RSC_ID.first..l_rsc_access_rec.TERR_RSC_ID.last
11163: update JTY_WEBADI_OTH_TERR_INTF jwot
11164: set status = x_return_status
11165: where exists
11166: (select 1 from JTY_WEBADI_RESOURCES jwr
11167: where jwr.LAY_SEQ_NUM = jwot.LAY_SEQ_NUM
11183: fnd_message.set_name ('JTF', 'JTY_OTH_TERR_CREATE_ACCESS');
11184: X_Msg_Data := fnd_message.get();
11185:
11186: forall i in l_rsc_access_rec.TERR_RSC_ID.first..l_rsc_access_rec.TERR_RSC_ID.last
11187: update JTY_WEBADI_OTH_TERR_INTF jwot
11188: set status = x_return_status,
11189: error_msg = x_msg_data
11190: where exists
11191: (select 1 from JTY_WEBADI_RESOURCES jwr
11225: ORG_ID = l_rsc_access_rec.ORG_ID(i)
11226: where TERR_RSC_ACCESS_ID = l_rsc_access_rec.TERR_RSC_ACCESS_ID(i);
11227:
11228: forall i in l_rsc_access_rec.TERR_RSC_ID.first..l_rsc_access_rec.TERR_RSC_ID.last
11229: update JTY_WEBADI_OTH_TERR_INTF jwot
11230: set status = x_return_status
11231: where exists
11232: (select 1 from JTY_WEBADI_RESOURCES jwr
11233: where jwr.LAY_SEQ_NUM = jwot.LAY_SEQ_NUM
11248: fnd_message.set_name ('JTF', 'JTY_OTH_TERR_UPDATE_ACCESS');
11249: X_Msg_Data := fnd_message.get();
11250:
11251: forall i in l_rsc_access_rec.TERR_RSC_ID.first..l_rsc_access_rec.TERR_RSC_ID.last
11252: update JTY_WEBADI_OTH_TERR_INTF jwot
11253: set status = x_return_status,
11254: error_msg = x_msg_data
11255: where exists
11256: (select 1 from JTY_WEBADI_RESOURCES jwr
11271: fnd_message.clear;
11272: fnd_message.set_name ('JTF', 'JTY_OTH_TERR_UPDATE_RSC');
11273: X_Msg_Data := fnd_message.get();
11274:
11275: update JTY_WEBADI_OTH_TERR_INTF jwot
11276: set status = x_return_status,
11277: error_msg = X_Msg_Data
11278: where exists
11279: (select 1 from JTY_WEBADI_RESOURCES jwr
11324:
11325: begin
11326: -- remove old inserted values from the interface table
11327: -- added 05/26/2006, bug 5249085
11328: delete from JTY_WEBADI_OTH_TERR_INTF
11329: where interface_type = l_intf_type
11330: and status is not null;
11331: --dbms_output.put_line('removed old data, row count: '||SQL%ROWCOUNT);
11332: commit;
11443: debugmsg('UPDATE_TERR_DEF: UPDATE_TERR_QUAL : x_msg_data : '||x_msg_data );
11444: else
11445: select NVL(status,'S') status, NVL(error_msg,'Success') error_msg, lay_seq_num
11446: bulk collect into l_status, l_error_msg, l_lay_seq_num
11447: from JTY_WEBADI_OTH_TERR_INTF
11448: where interface_type = l_intf_type
11449: and user_sequence = p_user_sequence;
11450:
11451: -- rollback all updated info
11452: debugmsg('UPDATE_TERR_DEF: UPDATE_TERR_QUAL : rollback all updated info : ' );
11453: rollback;
11454:
11455: forall i in l_lay_seq_num.first..l_lay_seq_num.last
11456: update JTY_WEBADI_OTH_TERR_INTF
11457: set status = l_status(i),
11458: error_msg = l_error_msg(i)
11459: where lay_seq_num = l_lay_seq_num(i)
11460: and interface_type = l_intf_type
11463: else
11464:
11465: select NVL(status,'S') status, NVL(error_msg,'Success') error_msg, lay_seq_num
11466: bulk collect into l_status, l_error_msg, l_lay_seq_num
11467: from JTY_WEBADI_OTH_TERR_INTF
11468: where interface_type = l_intf_type
11469: and user_sequence = p_user_sequence;
11470:
11471: -- rollback all updated info
11471: -- rollback all updated info
11472: rollback;
11473:
11474: forall i in l_lay_seq_num.first..l_lay_seq_num.last
11475: update JTY_WEBADI_OTH_TERR_INTF
11476: set status = l_status(i),
11477: error_msg = l_error_msg(i)
11478: where lay_seq_num = l_lay_seq_num(i)
11479: and interface_type = l_intf_type
11482: else
11483:
11484: select NVL(status,'S') status, NVL(error_msg,'Success') error_msg, lay_seq_num
11485: bulk collect into l_status, l_error_msg, l_lay_seq_num
11486: from JTY_WEBADI_OTH_TERR_INTF
11487: where interface_type = l_intf_type
11488: and user_sequence = p_user_sequence;
11489:
11490: -- rollback all updated info
11490: -- rollback all updated info
11491: rollback;
11492:
11493: forall i in l_lay_seq_num.first..l_lay_seq_num.last
11494: update JTY_WEBADI_OTH_TERR_INTF
11495: set status = l_status(i),
11496: error_msg = l_error_msg(i)
11497: where lay_seq_num = l_lay_seq_num(i)
11498: and interface_type = l_intf_type
11502: else
11503:
11504: select NVL(status,'S') status, NVL(error_msg,'Success') error_msg, lay_seq_num
11505: bulk collect into l_status, l_error_msg, l_lay_seq_num
11506: from JTY_WEBADI_OTH_TERR_INTF
11507: where interface_type = l_intf_type
11508: and user_sequence = p_user_sequence;
11509:
11510: -- rollback all updated info
11510: -- rollback all updated info
11511: rollback;
11512:
11513: forall i in l_lay_seq_num.first..l_lay_seq_num.last
11514: update JTY_WEBADI_OTH_TERR_INTF
11515: set status = l_status(i),
11516: error_msg = l_error_msg(i)
11517: where lay_seq_num = l_lay_seq_num(i)
11518: and interface_type = l_intf_type
11520: end if; -- territory
11521: else
11522: select NVL(status,'S') status, NVL(error_msg,'Success') error_msg, lay_seq_num
11523: bulk collect into l_status, l_error_msg, l_lay_seq_num
11524: from JTY_WEBADI_OTH_TERR_INTF
11525: where interface_type = l_intf_type
11526: and user_sequence = p_user_sequence;
11527:
11528: -- rollback all updated info
11528: -- rollback all updated info
11529: rollback;
11530:
11531: forall i in l_lay_seq_num.first..l_lay_seq_num.last
11532: update JTY_WEBADI_OTH_TERR_INTF
11533: set status = l_status(i),
11534: error_msg = l_error_msg(i)
11535: where lay_seq_num = l_lay_seq_num(i)
11536: and interface_type = l_intf_type