Commit 3c1a2981 authored by vvengurlekar's avatar vvengurlekar

AD89SUN091.sql- added message entry


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@196083 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a9089ad4
......@@ -2413,4 +2413,115 @@ set define off;
Insert into OBJ_ITEMCHANGE (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY) values ('emp_lveprkbal_trf','2','itm_default','Y');
commit;
\ No newline at end of file
commit;
-----------------------------------------
create or replace
FUNCTION FN_GET_EMP_NAME (as_emp_code char,as_return_type char)
return varchar2 is
ls_emp_fname employee.emp_fname%type;
ls_emp_mname employee.emp_mname%type;
ls_emp_lname employee.emp_lname%type;
ls_emp_fname_long employee.emp_fname_long%type;
ls_emp_mname_long employee.emp_mname_long%type;
ls_emp_lname_long employee.emp_lname_long%type;
ls_emp_aprv_name varchar2(120);
ls_emp_code__aprv employee.emp_code%type;
begin
ls_emp_code__aprv := as_emp_code;
if (as_return_type = 'Z') then -- For maintain compitability with database function used in SFA application
select INITCAP(trim(emp_fname)) ||' '||INITCAP(trim(emp_lname)) into ls_emp_aprv_name from employee where emp_code = ls_emp_code__aprv;
RETURN LS_EMP_APRV_NAME;
elsif (as_return_type = 'F') then
select emp_fname into ls_emp_fname from employee where emp_code = as_emp_code;
return ls_emp_fname;
elsif as_return_type ='M' then
select emp_mname into ls_emp_mname from employee where emp_code = as_emp_code;
return ls_emp_mname;
elsif as_return_type ='L' then
select emp_lname into ls_emp_lname from employee where emp_code = as_emp_code;
return ls_emp_lname;
elsif as_return_type ='X' then
select emp_fname,emp_mname,emp_lname into ls_emp_fname,ls_emp_mname,ls_emp_lname
from employee where emp_code = as_emp_code;
return trim(ls_emp_fname) ||' '|| trim(ls_emp_mname) ||' '|| trim(ls_emp_lname);
elsif as_return_type ='FL' then
select emp_fname,emp_mname,emp_lname into ls_emp_fname,ls_emp_mname,ls_emp_lname
from employee where emp_code = as_emp_code;
return trim(ls_emp_fname) ||' '|| trim(ls_emp_lname);
elsif as_return_type ='FM' then
select emp_fname,emp_mname,emp_lname into ls_emp_fname,ls_emp_mname,ls_emp_lname
from employee where emp_code = as_emp_code;
return trim(ls_emp_fname) ||' '|| trim(ls_emp_mname);
elsif as_return_type ='FML' then
select emp_fname,emp_mname,emp_lname into ls_emp_fname,ls_emp_mname,ls_emp_lname
from employee where emp_code = as_emp_code;
return trim(ls_emp_fname) ||' '|| trim(ls_emp_mname) ||' '|| trim(ls_emp_Lname);
elsif (as_return_type = 'F1') then
select case when emp_fname_long is null or length(trim(emp_fname_long)) = 0 then emp_fname else emp_fname_long end into ls_emp_fname_long from employee where emp_code = as_emp_code;
return ls_emp_fname_long;
elsif as_return_type ='M1' then
select case when emp_mname_long is null or length(trim(emp_mname_long)) = 0 then emp_mname else emp_mname_long end into ls_emp_mname_long from employee where emp_code = as_emp_code;
return ls_emp_mname_long;
elsif as_return_type ='L1' then
select case when emp_lname_long is null or length(trim(emp_fname_long)) = 0 then emp_lname else emp_lname_long end into ls_emp_lname from employee where emp_code = as_emp_code;
return ls_emp_lname;
elsif as_return_type ='X1' then
select case when emp_fname_long is null or length(trim(emp_fname_long)) = 0 then emp_fname else emp_fname_long end,
case when emp_mname_long is null or length(trim(emp_mname_long)) = 0 then emp_mname else emp_mname_long end,
case when emp_lname_long is null or length(trim(emp_fname_long)) = 0 then emp_lname else emp_lname_long end
into ls_emp_fname,ls_emp_mname,ls_emp_lname from employee where emp_code = as_emp_code;
return trim(ls_emp_fname) ||' '|| trim(ls_emp_mname) ||' '|| trim(ls_emp_lname);
elsif as_return_type ='FL1' then
select case when emp_fname_long is null or length(trim(emp_fname_long)) = 0 then emp_fname else emp_fname_long end,
case when emp_mname_long is null or length(trim(emp_mname_long)) = 0 then emp_mname else emp_mname_long end,
case when emp_lname_long is null or length(trim(emp_fname_long)) = 0 then emp_lname else emp_lname_long end
into ls_emp_fname,ls_emp_mname,ls_emp_lname from employee where emp_code = as_emp_code;
return trim(ls_emp_fname) ||' '|| trim(ls_emp_lname);
elsif as_return_type ='FM1' then
select case when emp_fname_long is null or length(trim(emp_fname_long)) = 0 then emp_fname else emp_fname_long end,
case when emp_mname_long is null or length(trim(emp_mname_long)) = 0 then emp_mname else emp_mname_long end,
case when emp_lname_long is null or length(trim(emp_fname_long)) = 0 then emp_lname else emp_lname_long end
into ls_emp_fname,ls_emp_mname,ls_emp_lname from employee where emp_code = as_emp_code;
return trim(ls_emp_fname) ||' '|| trim(ls_emp_mname);
elsif as_return_type ='FML1' then
select case when emp_fname_long is null or length(trim(emp_fname_long)) = 0 then emp_fname else emp_fname_long end,
case when emp_mname_long is null or length(trim(emp_mname_long)) = 0 then emp_mname else emp_mname_long end,
case when emp_lname_long is null or length(trim(emp_fname_long)) = 0 then emp_lname else emp_lname_long end
into ls_emp_fname,ls_emp_mname,ls_emp_lname from employee where emp_code = as_emp_code;
return trim(ls_emp_fname) ||' '|| trim(ls_emp_mname) ||' '|| trim(ls_emp_Lname);
end if;
return trim(ls_emp_fname) ||' '|| trim(ls_emp_mname) ||' '|| trim(ls_emp_Lname);
end;
/
-------------------------------ADDED BY ANJALI R. ON[07/09/2018][END]------------------------------------------
-------------------------------ADDED BY ANJALI R. ON[06/11/2018][Start]------------------------------------------
SET DEFINE OFF;
INSERT INTO MESSAGES (MSG_NO,MSG_STR,MSG_DESCR,MSG_TYPE,MSG_OPT,MSG_TIME,ALARM,ERR_SOURCE,CHG_DATE,CHG_USER,CHG_TERM,OVERRIDE_INPUT,MAIL_OPTION)
VALUES ('VTELPTRF29','Employee code From mismatch','Employee code from of header not matched with detail.','E',NULL,NULL,NULL,NULL,SYSDATE,'BASE','BASE',NULL,NULL);
COMMIT;
-------------------------------ADDED BY ANJALI R. ON[06/11/2018][END]------------------------------------------
-------------------------------ADDED BY Varsha V. ON[28/12/2018][Start]------------------------------------------
create index emp_lveprkbal_trfdet_u on emp_lveprkbal_trfdet (TRAN_ID__REF)
tablespace ITM_ADM_I1 ;
COMMIT;
-------------------------------ENDED BY Varsha V. ON[28/12/2018][END]------------------------------------------
-------------------------------ADDED BY Varsha V. ON[23/01/2019][Start]------------------------------------------
insert into MESSAGES (MSG_NO,MSG_STR,MSG_DESCR,MSG_TYPE,MSG_OPT,MSG_TIME,ALARM,ERR_SOURCE,CHG_DATE,CHG_USER,CHG_TERM,OVERRIDE_INPUT,MAIL_OPTION)
values ('VTEMPLVE22','Balance mismatch','Balance mismatch in negative leave balance transfer','E','Y',null,null,null,TO_DATE('22-10-00','DD-MM-RR'),'SUN ','HDP ',null,null);
COMMIT;
-------------------------------ENDED BY Varsha V. ON[23/01/2019][END]------------------------------------------
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment