daily pastebin goal
15%
SHARE
TWEET

Untitled

a guest Jan 23rd, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ----------Script: TRAVEL_5.6.0.004_4_S_API_PRIVILEGE_GENERATOR.sql
  2.  
  3. create or replace PROCEDURE API_PRIVILEGE_GENERATOR(code IN varchar2, module IN varchar2 )
  4. IS
  5.     v_query varchar2(4000);
  6. BEGIN
  7.     v_query:= 'INSERT INTO CMT_SYSTEM_PRIVILEGES (SPR_ID, SPR_CODE, SPR_NAME, SPR_ORDER, SPR_DESCRIPTION, SPR_MODULE)';
  8.     v_query:= v_query || ' VALUES(CMS_SPR_ID.nextval,';
  9.     v_query:= v_query || ' ''' || code || ''', ''' || code || ''',';
  10.     v_query:= v_query || ' (select COALESCE(max(SPR_ORDER), 0) from CMT_SYSTEM_PRIVILEGES WHERE SPR_AUDIT_RD IS NULL AND SPR_PRG_ID IS NULL) + 1, ';
  11.     v_query:= v_query || ' ''' || code || ''', ''' || module || ''')';
  12.     EXECUTE IMMEDIATE v_query;
  13.     COMMIT;
  14. END;
  15. /
  16. ----------Script end: TRAVEL_5.6.0.004_4_S_API_PRIVILEGE_GENERATOR.sql
  17.  
  18. ----------Script: TRAVEL_5.6.0.005_0_S_CMT_SYSTEM_PRIVILEGES.sql
  19.  
  20. ALTER TABLE CMT_SYSTEM_PRIVILEGES DROP COLUMN spr_order;
  21.  
  22. ----------Script end: TRAVEL_5.6.0.005_0_S_CMT_SYSTEM_PRIVILEGES.sql
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