Skip to content

Commit 9a3038f

Browse files
Added required SQLs for day N data load for PeopleSoft (#2980)
* fixed permission matching logic * fixed permission matching logic * fixed permission matching logic * fixed permission matching logic * updated PAR URL * Added to support handling of stuck podman container * fixed lint * Update agentAutoUpdate.sh * Update agentAutoUpdate.sh * Update agentAutoUpdate.sh * Fixed handling of force removal of stuck podman containers in stopping state * Fixed handling of force removal of stuck podman containers in stopping state * Added Peoplesoft views definitions * Added Peoplesoft views definitions, updated readme and created versions * Added Peoplesoft views definitions, updated readme and created versions * Added fix to remove the child processed before terminating the parent process * Added fix to remove the child processed before terminating the parent process * updated PSFT views * Added required SQLs for day N data load for PeopleSoft
1 parent 622d5ba commit 9a3038f

File tree

3 files changed

+117
-0
lines changed

3 files changed

+117
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
CREATE OR REPLACE TRIGGER ps_job_delete_trigger AFTER
2+
DELETE ON ps_job
3+
FOR EACH ROW
4+
DECLARE
5+
operationcode VARCHAR2(20);
6+
entitykey VARCHAR2(30);
7+
BEGIN
8+
IF deleting THEN
9+
operationcode := '2';
10+
entitykey := :old.emplid;
11+
END IF;
12+
13+
IF (
14+
operationcode IS NOT NULL
15+
AND entitykey IS NOT NULL
16+
) THEN
17+
UPDATE oag_entity_changes oec
18+
SET
19+
oec.timestamp = current_timestamp
20+
WHERE
21+
oec.opcode = operationcode
22+
AND oec.key = entitykey;
23+
24+
IF SQL%rowcount = 0 THEN
25+
INSERT INTO oag_entity_changes VALUES (
26+
entitykey,
27+
operationcode,
28+
current_timestamp
29+
);
30+
31+
END IF;
32+
33+
END IF;
34+
35+
EXCEPTION
36+
WHEN OTHERS THEN
37+
dbms_output.put_line('EXCEPTION ALERT!!!');
38+
END;
39+
/
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
CREATE OR REPLACE TRIGGER ps_personalData_delete_trigger AFTER
2+
DELETE ON ps_personal_data
3+
FOR EACH ROW
4+
DECLARE
5+
operationcode VARCHAR2(20);
6+
entitykey VARCHAR2(30);
7+
BEGIN
8+
IF deleting THEN
9+
operationcode := '1';
10+
entitykey := :old.emplid;
11+
END IF;
12+
13+
IF (
14+
operationcode IS NOT NULL
15+
AND entitykey IS NOT NULL
16+
) THEN
17+
UPDATE oag_entity_changes oec
18+
SET
19+
oec.timestamp = current_timestamp
20+
WHERE
21+
oec.opcode = operationcode
22+
AND oec.key = entitykey;
23+
24+
IF SQL%rowcount = 0 THEN
25+
INSERT INTO oag_entity_changes VALUES (
26+
entitykey,
27+
operationcode,
28+
current_timestamp
29+
);
30+
31+
END IF;
32+
33+
END IF;
34+
35+
EXCEPTION
36+
WHEN OTHERS THEN
37+
dbms_output.put_line('EXCEPTION ALERT!!!');
38+
END;
39+
/
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
CREATE OR REPLACE TRIGGER userprofile_delete_trigger AFTER
2+
DELETE ON psoprdefn
3+
FOR EACH ROW
4+
DECLARE
5+
operationcode VARCHAR2(20);
6+
entitykey VARCHAR2(30);
7+
BEGIN
8+
IF deleting THEN
9+
operationcode := '3';
10+
entitykey := :old.oprid;
11+
END IF;
12+
13+
IF (
14+
operationcode IS NOT NULL
15+
AND entitykey IS NOT NULL
16+
) THEN
17+
UPDATE oag_entity_changes oec
18+
SET
19+
oec.timestamp = current_timestamp
20+
WHERE
21+
oec.opcode = operationcode
22+
AND oec.key = entitykey;
23+
24+
IF SQL%rowcount = 0 THEN
25+
INSERT INTO oag_entity_changes VALUES (
26+
entitykey,
27+
operationcode,
28+
current_timestamp
29+
);
30+
31+
END IF;
32+
33+
END IF;
34+
35+
EXCEPTION
36+
WHEN OTHERS THEN
37+
dbms_output.put_line('EXCEPTION ALERT!!!');
38+
END;
39+
/

0 commit comments

Comments
 (0)