123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- CREATE OR REPLACE PROCEDURE shanglifeecif.insuranceclaimthread_main()
- IS
- BEGIN
- insert into shanglifeecif.insuranceclaimthread (
- icthreadid ,
- crno ,
-
- policyno ,
-
-
-
-
- cnno ,
- losstime ,
-
- rpname ,
-
-
- lpscutid,
-
- cndate ,
- lossdescribe ,
- crdate ,
- cndescribe ,
- claimstatus ,
- csdate ,
- relationship ,
- ccno ,
- ccstatus ,
-
- productid ,
- productname,
- ccamt ,
-
- claimcasestatus ,
- created_by ,
- created_time
-
-
- ) select
- row_number()over(),
- rgtno,
- contno,
- rptno,
- riskdate,
- rptorname,
- INSUREDNO,
-
- rptdate,
- lloccurreason,
- rgtdate,
- accidentdetail,
- llclaimstate,
- auditdate,
- relation,
- clmno,
- llgettype,
- riskcode,
- riskname,
- realpay,
- llclaimstate,
- 'admin',
- sysdate()
- from INSURANCE_CLAIM where contno is not null
-
- update shanglifeecif.insuranceclaimthread a set (
- lpid,
- lpname
- ) = (SELECT
- temp.indid,
- temp.name
- FROM (
- select
- b.indid,
- row_number() over(partition by b.scustid) rn,
- b.scustid,
- b.name
- from shanglifeecif.individual b
- ) temp WHERE a.lpscutid = temp.scustid AND temp.rn = 1);
- UPDATE shanglifeecif.insuranceclaimthread a SET (
- applicantid ,
- appname ,
- appphone ,
- appcertid,
- branchcode
- ) = (
-
- SELECT
- temp.applicantid ,
- temp.appname ,
- temp.appphone ,
- temp.appcertid,
- temp.branchcode
- FROM (
- select
- row_number() over(partition by applicantid) rn,
- applicantid ,
- appname ,
- appphone ,
- appcertid,
- branchcode,
- policyno
- from shanglifeecif.insurancearrangement b
-
-
- ) temp WHERE temp.policyno = a.policyno AND temp.rn = 1);
- */
- END;
- /
- BEGIN
- shanglifeecif.insuranceclaimthread_main();
- end
|