daily pastebin goal
58%
SHARE
TWEET

Untitled

a guest Feb 15th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DECLARE
  2.    CURSOR c1 (
  3.       cp    IN VARCHAR2,
  4.       cp2   IN VARCHAR2)
  5.    IS
  6.       SELECT DISTINCT
  7.             TO_CHAR (HCP_REQ_ID) HCP_REQ_ID,
  8.             HCARE_NAME,
  9.             --MKGPROF_ID,
  10.             FNC_MPO_NAME(MKGPROF_ID) MPO_NAME,
  11.             --MKGAREA_ID,
  12.             AREA_NAME(MKGAREA_ID) AREA_NAME,
  13.             HCARE_ADDR,
  14.             UDMHCPA_NO,
  15.             M_LATITUDE,
  16.             M_LONGITDE,
  17.             M_LONGITDE || ' - '||M_LATITUDE as Location,
  18.             HCP_MOBILE,
  19.             HCP_EMAILS,
  20.             HOTLINE_NO,
  21.             HCPINFO_ID,
  22.             HCP_REQ_DT,
  23.             case
  24.                 when HCPREQ_TYP = 1 then '<div style="font-weight:bold;font-size:16px; color: #DC6A10;">New Request</div>'
  25.                 when HCPREQ_TYP = 2 then '<div style="font-weight:bold;font-size:16px; color: #105EDC;">Update Request</div>'
  26.                 when HCPREQ_TYP = 3 then '<div style="font-weight:bold;font-size:16px; color: #7aa90a;">Delete Request</div>'
  27.                 else null
  28.             end as HCPREQ_TYP  
  29.         FROM BO_REQS_HCP
  30.        WHERE HCP_REQ_ID = cp AND MKGPROF_ID = cp2;
  31.  
  32.    rec1   BO_REQS_HCP%ROWTYPE;
  33. BEGIN
  34.    FOR i IN c1 (:P526_MPO_REQ,:P526_MPO)
  35.    LOOP
  36.         :P526_REQ_ID     := i.HCPINFO_ID;
  37.         --:P526_MPO_ID     := i.MKGPROF_ID;
  38.         :P526_MPO_ID     := i.MPO_NAME;
  39.         --:P526_AREA_ID    := i.MKGAREA_ID;
  40.         :P526_AREA_ID    := i.AREA_NAME;
  41.         :P526_HOS_NAME   := i.HCARE_NAME;
  42.         :P526_HOS_CODE   := i.UDMHCPA_NO;
  43.         :P526_HOS_MOB    := i.HCP_MOBILE;
  44.         :P526_HOTLINE_NO := i.HOTLINE_NO;
  45.         :P526_HOS_ADD    := i.HCARE_ADDR;
  46.         :P526_HOS_EMAIL  := i.HCP_EMAILS;
  47.         :P526_REQ_DATE   := i.HCP_REQ_DT;
  48.         :P526_REQ_TYP    := i.HCPREQ_TYP;
  49.    END LOOP;
  50. END;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top