Advertisement
psi_mmobile

Untitled

Apr 19th, 2021
1,276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PL/SQL 3.29 KB | None | 0 0
  1. CREATE OR REPLACE FORCE EDITIONABLE VIEW "OF_OWNER"."V_PERSON_STRING" ("PERSON_ID", "QUALIFICATION", "GROUP_NAMES", "KEY_STRING", "PLANNED_WBS", "COMPANY_NAME", "PERSON_CERTIFICATES", "PROOF_OF_IDENTITY", "PROOF_OF_RESIDENCE", "PROOF_OF_WORK", "ADMIN_PROFILE_CATEGORY","PERSON_ROLE_LIST","PERSON_ID_STRING") AS
  2.   SELECT PERSON_ID, qualification,  GROUP_NAMES, KEY_STRING, PLANNED_WBS, COMPANY_NAME, PERSON_CERTIFICATES,
  3.        Proof_Of_Identity, Proof_Of_Residence, Proof_Of_Work, Admin_Profile_Category,
  4.        UPPER(PERSON_ID_STRING) || ' ' || UPPER(GROUP_NAMES) || ' ' || KEY_STRING PERSON_ID_STRING      
  5.   FROM (
  6.       SELECT
  7.       Person.person_id PERSON_ID,
  8.       P_PERSON.get_master_qualification(person.person_id) AS qualification,    
  9.       DECODE(LENGTH(TRANSLATE(TRIM(Person.COMPANY_NR),' 0123456789',' ')), NULL, TO_NUMBER(TRIM(Person.COMPANY_NR)), 0) COMPANY_NR_INT,
  10.       P_PERSON.list_person_group_name(Person.PERSON_ID) GROUP_NAMES,
  11.       P_PERSON.list_person_key_strings(Person.PERSON_ID) KEY_STRING,
  12.       P_PERSON.getPlannedWBS(Person.PERSON_ID) PLANNED_WBS,
  13.       p_person.getCompanyName(Person.person_id) COMPANY_NAME,
  14.       P_PERSON.LIST_PERSON_CERTIFICATES(Person.PERSON_ID) PERSON_CERTIFICATES,
  15.       p_person.isAdminProofCatValid(1, Person.PERSON_ID, TRUNC(SYSDATE)) AS Proof_Of_Identity,
  16.       p_person.isAdminProofCatValid(2, Person.PERSON_ID, TRUNC(SYSDATE)) AS Proof_Of_Residence,
  17.       p_person.isAdminProofCatValid(3, Person.PERSON_ID, TRUNC(SYSDATE)) AS Proof_Of_Work,
  18.       P_PERSON.getAdminProfileCategory(Person.ADMIN_PROFILE_ID) AS Admin_Profile_Category,
  19.       P_PERSON.list_person_roles(Person.PERSON_ID) AS PERSON_ROLE_LIST,
  20.       UPPER(p_person.getCompanyName(Person.person_id) || ' ' ||  Person.PHONE || ' ' || Person.BIRTH_DATE || ' ' || Person.EMAIL
  21.             || ' ' || Person.END_WORK_DATE || ' ' || Person.GENDER || ' ' || Person.MSISDN || ' ' || Person.NISS || ' ' || Person.LIMOSA
  22.             || ' ' || P_PERSON.list_person_roles(Person.PERSON_ID)) PERSON_ID_STRING
  23.       FROM person
  24.       WHERE person.person_status_id IN (0, 1)
  25.     );
  26.  
  27.  
  28. CREATE MATERIALIZED VIEW "OF_OWNER"."MV_PERSON_STRING" ("PERSON_ID", "QUALIFICATION", "GROUP_NAMES", "KEY_STRING", "PLANNED_WBS", "COMPANY_NAME", "PERSON_ID_STRING", "PERSON_CERTIFICATES", "PROOF_OF_IDENTITY", "PROOF_OF_RESIDENCE", "PROOF_OF_WORK", "ADMIN_PROFILE_CATEGORY","PERSON_ROLE_LIST")
  29.   SEGMENT CREATION IMMEDIATE
  30.   ORGANIZATION HEAP PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
  31.  NOCOMPRESS LOGGING
  32.   STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  33.   PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  34.   BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  35.   TABLESPACE "FLEETDATA"   NO INMEMORY
  36.   BUILD IMMEDIATE
  37.   USING INDEX
  38.   REFRESH FORCE ON DEMAND START WITH SYSDATE+0 NEXT SYSDATE + 10/1440
  39.   USING DEFAULT LOCAL ROLLBACK SEGMENT
  40.   USING ENFORCED CONSTRAINTS DISABLE ON QUERY COMPUTATION DISABLE QUERY REWRITE
  41.   AS SELECT PERSON_ID, qualification,  GROUP_NAMES, KEY_STRING, PLANNED_WBS,
  42. COMPANY_NAME, PERSON_ID_STRING,
  43. PERSON_CERTIFICATES, PROOF_OF_IDENTITY, PROOF_OF_RESIDENCE, PROOF_OF_WORK,
  44. ADMIN_PROFILE_CATEGORY,PERSON_ROLE_LIST
  45. FROM v_person_string;
  46.  
  47.    COMMENT ON MATERIALIZED VIEW "OF_OWNER"."MV_PERSON_STRING"  IS 'snapshot table for snapshot OF_OWNER.MV_PERSON_STRING';
  48.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement