149: NVL(X_LAST_UPDATED_BY,FND_GLOBAL.USER_ID),
150: NVL(X_LAST_UPDATE_LOGIN,FND_GLOBAL.LOGIN_ID)
151: );
152:
153: insert into GMD_QC_TEST_VALUES_TL (
154: TEST_VALUE_ID,
155: DISPLAY_LABEL_NUMERIC_RANGE,
156: TEST_VALUE_DESC,
157: CREATION_DATE,
175: from FND_LANGUAGES L
176: where L.INSTALLED_FLAG in ('I', 'B')
177: and not exists
178: (select NULL
179: from GMD_QC_TEST_VALUES_TL T
180: where T.TEST_VALUE_ID = X_TEST_VALUE_ID
181: and T.LANGUAGE = L.LANGUAGE_CODE);
182:
183: open c;
340: cursor c1 is select
341: DISPLAY_LABEL_NUMERIC_RANGE,
342: TEST_VALUE_DESC,
343: decode(LANGUAGE, userenv('LANG'), 'Y', 'N') BASELANG
344: from GMD_QC_TEST_VALUES_TL
345: where TEST_VALUE_ID = X_TEST_VALUE_ID
346: and userenv('LANG') in (LANGUAGE, SOURCE_LANG)
347: for update of TEST_VALUE_ID nowait;
348: begin
548: if (sql%notfound) then
549: raise no_data_found;
550: end if;
551:
552: update GMD_QC_TEST_VALUES_TL set
553: DISPLAY_LABEL_NUMERIC_RANGE = X_DISPLAY_LABEL_NUMERIC_RANGE,
554: TEST_VALUE_DESC = X_TEST_VALUE_DESC,
555: LAST_UPDATE_DATE = X_LAST_UPDATE_DATE,
556: LAST_UPDATED_BY = X_LAST_UPDATED_BY,
566:
567: FUNCTION DELETE_ROW (p_test_value_id in NUMBER) RETURN BOOLEAN IS
568: begin
569: IF p_test_value_id IS NOT NULL THEN
570: DELETE from GMD_QC_TEST_VALUES_TL
571: where TEST_VALUE_ID = p_test_value_id ;
572:
573: if (sql%notfound) then
574: raise no_data_found;
600:
601: procedure ADD_LANGUAGE
602: is
603: begin
604: delete from GMD_QC_TEST_VALUES_TL T
605: where not exists
606: (select NULL
607: from GMD_QC_TEST_VALUES_B B
608: where B.TEST_VALUE_ID = T.TEST_VALUE_ID
607: from GMD_QC_TEST_VALUES_B B
608: where B.TEST_VALUE_ID = T.TEST_VALUE_ID
609: );
610:
611: update GMD_QC_TEST_VALUES_TL T set (
612: DISPLAY_LABEL_NUMERIC_RANGE,
613: TEST_VALUE_DESC
614: ) = (select
615: B.DISPLAY_LABEL_NUMERIC_RANGE,
613: TEST_VALUE_DESC
614: ) = (select
615: B.DISPLAY_LABEL_NUMERIC_RANGE,
616: B.TEST_VALUE_DESC
617: from GMD_QC_TEST_VALUES_TL B
618: where B.TEST_VALUE_ID = T.TEST_VALUE_ID
619: and B.LANGUAGE = T.SOURCE_LANG)
620: where (
621: T.TEST_VALUE_ID,
622: T.LANGUAGE
623: ) in (select
624: SUBT.TEST_VALUE_ID,
625: SUBT.LANGUAGE
626: from GMD_QC_TEST_VALUES_TL SUBB, GMD_QC_TEST_VALUES_TL SUBT
627: where SUBB.TEST_VALUE_ID = SUBT.TEST_VALUE_ID
628: and SUBB.LANGUAGE = SUBT.SOURCE_LANG
629: and (SUBB.DISPLAY_LABEL_NUMERIC_RANGE <> SUBT.DISPLAY_LABEL_NUMERIC_RANGE
630: or (SUBB.DISPLAY_LABEL_NUMERIC_RANGE is null and SUBT.DISPLAY_LABEL_NUMERIC_RANGE is not null)
633: or (SUBB.TEST_VALUE_DESC is null and SUBT.TEST_VALUE_DESC is not null)
634: or (SUBB.TEST_VALUE_DESC is not null and SUBT.TEST_VALUE_DESC is null)
635: ));
636:
637: insert into GMD_QC_TEST_VALUES_TL (
638: TEST_VALUE_ID,
639: DISPLAY_LABEL_NUMERIC_RANGE,
640: TEST_VALUE_DESC,
641: CREATION_DATE,
655: B.LAST_UPDATE_DATE,
656: B.LAST_UPDATE_LOGIN,
657: L.LANGUAGE_CODE,
658: B.SOURCE_LANG
659: from GMD_QC_TEST_VALUES_TL B, FND_LANGUAGES L
660: where L.INSTALLED_FLAG in ('I', 'B')
661: and B.LANGUAGE = userenv('LANG')
662: and not exists
663: (select NULL
660: where L.INSTALLED_FLAG in ('I', 'B')
661: and B.LANGUAGE = userenv('LANG')
662: and not exists
663: (select NULL
664: from GMD_QC_TEST_VALUES_TL T
665: where T.TEST_VALUE_ID = B.TEST_VALUE_ID
666: and T.LANGUAGE = L.LANGUAGE_CODE);
667: end ADD_LANGUAGE;
668: