/*****************************************************************************
*
* Filename         - $Workfile:   get_priv.sql  $
*
*                     Name              Date      Version     CR Number
* Author           - See revision history below.
* Last Update      - See revision history below.
*
* Project Name     - TAGTRAK(Oracle Database)
*
* Source Code
* Identifier       - 0/3/300/8010/112
*
* Design Spec
* Section          - 
*
* Contents         - Live Schema Stored Procedure
*
* Language         - Oracle SQL*Plus script
*
* Classification   - Commercial In Confidence
*
*          (c) Ultra Electronics Limited, 1997
*
*****************************************************************************/
/****************************************************************************
* @(#)$Workfile:   get_priv.sql  $  $Revision:   1.7  $
*
* Revision History
*
* Note that user tagtrak is many users. For these users the user
* name is entered as the last line in the change description.
*
* $Log:   /shared/pvcs/tagtarch/db_ora/db/source/live/procedures/get_priv.sqv  $
* 
*    Rev 1.7   16 Dec 1998 11:34:14   tagtrak
* OR: 12412 12200
* CR: 12412
* REV:
* Extent user_group table and associated views, procedures
* and functions, to handle more than 50 privilege codes.
* This was extended to 62, to allow upper and lower case alphabet
* plus 10 digits.
* -------------
* Andrew Walker
* -------------
* (branch ATS revision copied to trunk.)
* Andrew Walker
* 
*    Rev 1.6.1.0   19 Nov 1998 16:14:34   tagtrak
* OR: 12412 12200
* CR: 12412
* REV:
* Extent user_group table and associated views, procedures
* and functions, to handle more than 50 privilege codes.
* This was extended to 62, to allow upper and lower case alphabet
* plus 10 digits.
* -------------
* Andrew Walker
* 
*    Rev 1.6   02 Apr 1998 19:36:12   tagtrak
* OR:
* CR:
* REV:
* Initial Issue
* See label for concession
* 
*    Rev 1.5   26 Feb 1998 10:13:42   tagtrak
* OR:
* CR:
* REV:
* Initial core product version
* 
*    Rev 1.4   15 Jan 1998 12:13:02   tagtrak
* OR: OR11101, TN13, TN15
* CR:
* REV:
* Phase 2C to Phase 3 upgrade plus code review actions and resolving some technical isses.
* 
*    Rev 1.3   24 Oct 1997 11:12:34   tagtrak
* Added PVCS header information
*
****************************************************************************/

PROMPT create or replace procedure get_priv

create or replace procedure get_priv (
    p1      in      char,
    p2      in      char,
    p3      in      char,
    p4      in      char,
    p5      in      char,
    p6      in      char,
    p7      in      char,
    p8      in      char,
    p9      in      char,
    p10     in      char,
    p11     in      char,
    p12     in      char,
    p13     in      char,
    p14     in      char,
    p15     in      char,
    p16     in      char,
    p17     in      char,
    p18     in      char,
    p19     in      char,
    p20     in      char,
    p21     in      char,
    p22     in      char,
    p23     in      char,
    p24     in      char,
    p25     in      char,
    p26     in      char,
    p27     in      char,
    p28     in      char,
    p29     in      char,
    p30     in      char,
    p31     in      char,
    p32     in      char,
    p33     in      char,
    p34     in      char,
    p35     in      char,
    p36     in      char,
    p37     in      char,
    p38     in      char,
    p39     in      char,
    p40     in      char,
    p41     in      char,
    p42     in      char,
    p43     in      char,
    p44     in      char,
    p45     in      char,
    p46     in      char,
    p47     in      char,
    p48     in      char,
    p49     in      char,
    p50     in      char,
    p51     in      char,
    p52     in      char,
    p53     in      char,
    p54     in      char,
    p55     in      char,
    p56     in      char,
    p57     in      char,
    p58     in      char,
    p59     in      char,
    p60     in      char,
    p61     in      char,
    p62     in      char,
    p63     in      char,
    p64     in      char,
    p65     in      char,
    p66     in      char,
    p67     in      char,
    p68     in      char,
    p69     in      char,
    p70     in      char,
    p71     in      char,
    p72     in      char,
    p73     in      char,
    p74     in      char,
    p75     in      char,
    p76     in      char,
    p77     in      char,
    p78     in      char,
    p79     in      char,
    p80     in      char,
    p81     in      char,
    p82     in      char,
    p83     in      char,
    p84     in      char,
    p85     in      char,
    p86     in      char,
    p87     in      char,
    p88     in      char,
    p89     in      char,
    p90     in      char,
    p91     in      char,
    p92     in      char,
    p93     in      char,
    p94     in      char,
    p95     in      char,
    p96     in      char,
    p97     in      char,
    p98     in      char,
    p99     in      char,
    p100    in      char,
    privstr in out  varchar2
) 
as
begin

    /*
     * - Set up the privstr field according to the privileges for this user.
     */

    privstr := p1;

    if (p2 IS NOT NULL) then
        privstr := privstr||p2;
    end if;

    if (p3 IS NOT NULL) then
        privstr := privstr||p3;
    end if;


    if (p4 IS NOT NULL) then
        privstr := privstr||p4;
    end if;


    if (p5 IS NOT NULL) then
        privstr := privstr||p5;
    end if;


    if (p6 IS NOT NULL) then 
        privstr := privstr||p6;
    end if;


    if (p7 IS NOT NULL) then 
        privstr := privstr||p7;
    end if;


    if (p8 IS NOT NULL) then 
        privstr := privstr||p8;
    end if;


    if (p9 IS NOT NULL) then 
        privstr := privstr||p9;
    end if;


    if (p10 IS NOT NULL) then 
        privstr := privstr||p10;
    end if;


    if (p11 IS NOT NULL) then 
        privstr := privstr||p11;
    end if;


    if (p12 IS NOT NULL) then 
        privstr := privstr||p12;
    end if;


    if (p13 IS NOT NULL) then 
        privstr := privstr||p13;
    end if;


    if (p14 IS NOT NULL) then 
        privstr := privstr||p14;
    end if;


    if (p15 IS NOT NULL) then 
        privstr := privstr||p15;
    end if;


    if (p16 IS NOT NULL) then 
        privstr := privstr||p16;
    end if;


    if (p17 IS NOT NULL) then 
        privstr := privstr||p17;
    end if;


    if (p18 IS NOT NULL) then 
        privstr := privstr||p18;
    end if;


    if (p19 IS NOT NULL) then 
        privstr := privstr||p19;
    end if;


    if (p20 IS NOT NULL) then 
        privstr := privstr||p20;
    end if;


    if (p21 IS NOT NULL) then 
        privstr := privstr||p21;
    end if;


    if (p22 IS NOT NULL) then 
        privstr := privstr||p22;
    end if;


    if (p23 IS NOT NULL) then 
        privstr := privstr||p23;
    end if;


    if (p24 IS NOT NULL) then 
        privstr := privstr||p24;
    end if;


    if (p25 IS NOT NULL) then 
        privstr := privstr||p25;
    end if;


    if (p26 IS NOT NULL) then 
        privstr := privstr||p26;
    end if;


    if (p27 IS NOT NULL) then 
        privstr := privstr||p27;
    end if;


    if (p28 IS NOT NULL) then 
        privstr := privstr||p28;
    end if;


    if (p29 IS NOT NULL) then 
        privstr := privstr||p29;
    end if;


    if (p30 IS NOT NULL) then 
        privstr := privstr||p30;
    end if;


    if (p31 IS NOT NULL) then 
        privstr := privstr||p31;
    end if;


    if (p32 IS NOT NULL) then 
        privstr := privstr||p32;
    end if;


    if (p33 IS NOT NULL) then 
        privstr := privstr||p33;
    end if;


    if (p34 IS NOT NULL) then 
        privstr := privstr||p34;
    end if;


    if (p35 IS NOT NULL) then 
        privstr := privstr||p35;
    end if;


    if (p36 IS NOT NULL) then 
        privstr := privstr||p36;
    end if;


    if (p37 IS NOT NULL) then 
        privstr := privstr||p37;
    end if;


    if (p38 IS NOT NULL) then 
        privstr := privstr||p38;
    end if;


    if (p39 IS NOT NULL) then 
        privstr := privstr||p39;
    end if;


    if (p40 IS NOT NULL) then 
        privstr := privstr||p40;
    end if;


    if (p41 IS NOT NULL) then 
        privstr := privstr||p41;
    end if;


    if (p42 IS NOT NULL) then 
        privstr := privstr||p42;
    end if;


    if (p43 IS NOT NULL) then 
        privstr := privstr||p43;
    end if;


    if (p44 IS NOT NULL) then 
        privstr := privstr||p44;
    end if;


    if (p45 IS NOT NULL) then 
        privstr := privstr||p45;
    end if;


    if (p46 IS NOT NULL) then 
        privstr := privstr||p46;
    end if;


    if (p47 IS NOT NULL) then 
        privstr := privstr||p47;
    end if;


    if (p48 IS NOT NULL) then 
        privstr := privstr||p48;
    end if;


    if (p49 IS NOT NULL) then 
        privstr := privstr||p49;
    end if;


    if (p50 IS NOT NULL) then 
        privstr := privstr||p50;
    end if;

    if (p51 IS NOT NULL) then 
        privstr := privstr||p51;
    end if;

    if (p52 IS NOT NULL) then 
        privstr := privstr||p52;
    end if;

    if (p53 IS NOT NULL) then 
        privstr := privstr||p53;
    end if;

    if (p54 IS NOT NULL) then 
        privstr := privstr||p54;
    end if;

    if (p55 IS NOT NULL) then 
        privstr := privstr||p55;
    end if;

    if (p56 IS NOT NULL) then 
        privstr := privstr||p56;
    end if;

    if (p57 IS NOT NULL) then 
        privstr := privstr||p57;
    end if;

    if (p58 IS NOT NULL) then 
        privstr := privstr||p58;
    end if;

    if (p59 IS NOT NULL) then 
        privstr := privstr||p59;
    end if;

    if (p60 IS NOT NULL) then 
        privstr := privstr||p60;
    end if;

    if (p61 IS NOT NULL) then 
        privstr := privstr||p61;
    end if;

    if (p62 IS NOT NULL) then 
        privstr := privstr||p62;
    end if;


    if (p63 IS NOT NULL) then 
        privstr := privstr||p63;
    end if;


    if (p64 IS NOT NULL) then 
        privstr := privstr||p64;
    end if;


    if (p65 IS NOT NULL) then 
        privstr := privstr||p65;
    end if;


    if (p66 IS NOT NULL) then 
        privstr := privstr||p66;
    end if;


    if (p67 IS NOT NULL) then 
        privstr := privstr||p67;
    end if;


    if (p68 IS NOT NULL) then 
        privstr := privstr||p68;
    end if;


    if (p69 IS NOT NULL) then 
        privstr := privstr||p69;
    end if;


    if (p70 IS NOT NULL) then 
        privstr := privstr||p70;
    end if;


    if (p71 IS NOT NULL) then 
        privstr := privstr||p71;
    end if;


    if (p72 IS NOT NULL) then 
        privstr := privstr||p72;
    end if;


    if (p73 IS NOT NULL) then 
        privstr := privstr||p73;
    end if;


    if (p74 IS NOT NULL) then 
        privstr := privstr||p74;
    end if;


    if (p75 IS NOT NULL) then 
        privstr := privstr||p75;
    end if;


    if (p76 IS NOT NULL) then 
        privstr := privstr||p76;
    end if;


    if (p77 IS NOT NULL) then 
        privstr := privstr||p77;
    end if;


    if (p78 IS NOT NULL) then 
        privstr := privstr||p78;
    end if;


    if (p79 IS NOT NULL) then 
        privstr := privstr||p79;
    end if;


    if (p80 IS NOT NULL) then 
        privstr := privstr||p80;
    end if;

    if (p81 IS NOT NULL) then 
        privstr := privstr||p81;
    end if;

    if (p82 IS NOT NULL) then 
        privstr := privstr||p82;
    end if;

    if (p83 IS NOT NULL) then 
        privstr := privstr||p83;
    end if;

    if (p84 IS NOT NULL) then 
        privstr := privstr||p84;
    end if;

    if (p85 IS NOT NULL) then 
        privstr := privstr||p85;
    end if;

    if (p86 IS NOT NULL) then 
        privstr := privstr||p86;
    end if;

    if (p87 IS NOT NULL) then 
        privstr := privstr||p87;
    end if;

    if (p88 IS NOT NULL) then 
        privstr := privstr||p88;
    end if;

    if (p89 IS NOT NULL) then 
        privstr := privstr||p89;
    end if;

    if (p90 IS NOT NULL) then 
        privstr := privstr||p90;
    end if;

    if (p91 IS NOT NULL) then 
        privstr := privstr||p91;
    end if;

    if (p92 IS NOT NULL) then 
        privstr := privstr||p92;
    end if;

    if (p93 IS NOT NULL) then 
        privstr := privstr||p93;
    end if;

    if (p94 IS NOT NULL) then 
        privstr := privstr||p94;
    end if;

    if (p95 IS NOT NULL) then 
        privstr := privstr||p95;
    end if;

    if (p96 IS NOT NULL) then 
        privstr := privstr||p96;
    end if;

    if (p97 IS NOT NULL) then 
        privstr := privstr||p97;
    end if;

    if (p98 IS NOT NULL) then 
        privstr := privstr||p98;
    end if;

    if (p99 IS NOT NULL) then 
        privstr := privstr||p99;
    end if;

    if (p100 IS NOT NULL) then 
        privstr := privstr||p100;
    end if;
end get_priv;
/
