[Home] [Help]
119: l_start_date, -- 12.16.2003 tsho: use l_start_date instead of X_START_DATE
120: X_PERIOD_NAME
121: );
122:
123: insert into AMW_ASSESSMENTS_TL (
124: LAST_UPDATE_LOGIN,
125: ASSESSMENT_ID,
126: NAME,
127: DESCRIPTION,
147: from FND_LANGUAGES L
148: where L.INSTALLED_FLAG in ('I', 'B')
149: and not exists
150: (select NULL
151: from AMW_ASSESSMENTS_TL T
152: where T.ASSESSMENT_ID = X_ASSESSMENT_ID
153: and T.LANGUAGE = L.LANGUAGE_CODE);
154:
155: open c;
230: cursor c1 is select
231: NAME,
232: DESCRIPTION,
233: decode(LANGUAGE, userenv('LANG'), 'Y', 'N') BASELANG
234: from AMW_ASSESSMENTS_TL
235: where ASSESSMENT_ID = X_ASSESSMENT_ID
236: and userenv('LANG') in (LANGUAGE, SOURCE_LANG)
237: for update of ASSESSMENT_ID nowait;
238: begin
398: if (sql%notfound) then
399: raise no_data_found;
400: end if;
401:
402: update AMW_ASSESSMENTS_TL set
403: NAME = X_NAME,
404: DESCRIPTION = X_DESCRIPTION,
405: LAST_UPDATE_DATE = X_LAST_UPDATE_DATE,
406: LAST_UPDATED_BY = X_LAST_UPDATED_BY,
417: procedure DELETE_ROW (
418: X_ASSESSMENT_ID in NUMBER
419: ) is
420: begin
421: delete from AMW_ASSESSMENTS_TL
422: where ASSESSMENT_ID = X_ASSESSMENT_ID;
423:
424: if (sql%notfound) then
425: raise no_data_found;
435:
436: procedure ADD_LANGUAGE
437: is
438: begin
439: delete from AMW_ASSESSMENTS_TL T
440: where not exists
441: (select NULL
442: from AMW_ASSESSMENTS_B B
443: where B.ASSESSMENT_ID = T.ASSESSMENT_ID
442: from AMW_ASSESSMENTS_B B
443: where B.ASSESSMENT_ID = T.ASSESSMENT_ID
444: );
445:
446: update AMW_ASSESSMENTS_TL T set (
447: NAME,
448: DESCRIPTION
449: ) = (select
450: B.NAME,
448: DESCRIPTION
449: ) = (select
450: B.NAME,
451: B.DESCRIPTION
452: from AMW_ASSESSMENTS_TL B
453: where B.ASSESSMENT_ID = T.ASSESSMENT_ID
454: and B.LANGUAGE = T.SOURCE_LANG)
455: where (
456: T.ASSESSMENT_ID,
457: T.LANGUAGE
458: ) in (select
459: SUBT.ASSESSMENT_ID,
460: SUBT.LANGUAGE
461: from AMW_ASSESSMENTS_TL SUBB, AMW_ASSESSMENTS_TL SUBT
462: where SUBB.ASSESSMENT_ID = SUBT.ASSESSMENT_ID
463: and SUBB.LANGUAGE = SUBT.SOURCE_LANG
464: and (SUBB.NAME <> SUBT.NAME
465: or SUBB.DESCRIPTION <> SUBT.DESCRIPTION
466: or (SUBB.DESCRIPTION is null and SUBT.DESCRIPTION is not null)
467: or (SUBB.DESCRIPTION is not null and SUBT.DESCRIPTION is null)
468: ));
469:
470: insert into AMW_ASSESSMENTS_TL (
471: LAST_UPDATE_LOGIN,
472: ASSESSMENT_ID,
473: NAME,
474: DESCRIPTION,
490: B.CREATED_BY,
491: B.SECURITY_GROUP_ID,
492: L.LANGUAGE_CODE,
493: B.SOURCE_LANG
494: from AMW_ASSESSMENTS_TL B, FND_LANGUAGES L
495: where L.INSTALLED_FLAG in ('I', 'B')
496: and B.LANGUAGE = userenv('LANG')
497: and not exists
498: (select NULL
495: where L.INSTALLED_FLAG in ('I', 'B')
496: and B.LANGUAGE = userenv('LANG')
497: and not exists
498: (select NULL
499: from AMW_ASSESSMENTS_TL T
500: where T.ASSESSMENT_ID = B.ASSESSMENT_ID
501: and T.LANGUAGE = L.LANGUAGE_CODE);
502: end ADD_LANGUAGE;
503: