~halega/+junk/sqlinstaller

« back to all changes in this revision

Viewing changes to SQLInstaller.Sample/Scripts/Oracle/Install/StoredProcedures/EMPLOYEETERRITORIES.StoredProcedure.sql

  • Committer: sk
  • Date: 2011-09-10 05:32:36 UTC
  • Revision ID: halega@halega.com-20110910053236-1877r3p0k4a64bgx
Tags: 1.2.2
1.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
CREATE OR REPLACE PROCEDURE EMPLOYEETERRITORIESSELECT
 
3
(
 
4
    RESULTSET OUT SYS_REFCURSOR
 
5
)
 
6
IS
 
7
BEGIN
 
8
    OPEN RESULTSET FOR
 
9
        SELECT
 
10
                EMPLOYEEID,
 
11
                TERRITORYID
 
12
        FROM EMPLOYEETERRITORIES;
 
13
 
 
14
END;
 
15
/
 
16
 
 
17
 
 
18
 
 
19
CREATE OR REPLACE PROCEDURE EMPLOYEETERRITORIESINSERT
 
20
(
 
21
        VEMPLOYEEID IN EMPLOYEETERRITORIES.EMPLOYEEID%type,
 
22
        VTERRITORYID IN EMPLOYEETERRITORIES.TERRITORYID%type
 
23
)
 
24
IS
 
25
BEGIN
 
26
 
 
27
 
 
28
        INSERT
 
29
        INTO EMPLOYEETERRITORIES
 
30
        (
 
31
                EMPLOYEEID,
 
32
                TERRITORYID
 
33
        )
 
34
        VALUES
 
35
        (
 
36
                VEMPLOYEEID,
 
37
                VTERRITORYID
 
38
        );
 
39
END;
 
40
/
 
41
 
 
42
CREATE OR REPLACE PROCEDURE EMPLOYEETERRITORIESDELETE
 
43
(
 
44
        VEMPLOYEEID IN EMPLOYEETERRITORIES.EMPLOYEEID%type,
 
45
        VTERRITORYID IN EMPLOYEETERRITORIES.TERRITORYID%type
 
46
)
 
47
IS
 
48
BEGIN
 
49
 
 
50
        DELETE  FROM EMPLOYEETERRITORIES
 
51
        WHERE
 
52
                EMPLOYEEID = VEMPLOYEEID AND
 
53
                TERRITORYID = VTERRITORYID;
 
54
 
 
55
END;
 
56
/