Advertisement
psi_mmobile

Untitled

Sep 25th, 2020
1,404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PL/SQL 3.68 KB | None | 0 0
  1. DECLARE
  2.   CURSOR c1
  3.   IS
  4.     SELECT so_comment,
  5.       social_office_transaction_id
  6.     FROM social_office_transaction
  7.     WHERE CREATION_DATE BETWEEN TRUNC(SYSDATE - 10) AND TRUNC(SYSDATE)
  8.     AND SO_COMMENT IS NOT NULL;
  9. PROCEDURE bufferCrap IS
  10. BEGIN
  11.   FOR c IN c1
  12.   LOOP
  13.     IF (c.SO_COMMENT LIKE '%Remarque 1 :%' OR c.SO_COMMENT LIKE '%Opmerking 1 :%') THEN
  14.       INSERT INTO SOT_ADMIN_REMARK VALUES
  15.         (c.social_office_transaction_id, 1
  16.         );
  17.     END IF;
  18.     IF (c.SO_COMMENT LIKE '%Remarque 2 :%' OR c.SO_COMMENT LIKE '%Opmerking 2 :%') THEN
  19.       INSERT INTO SOT_ADMIN_REMARK VALUES
  20.         (c.social_office_transaction_id, 2
  21.         );
  22.     END IF;
  23.     IF (c.SO_COMMENT LIKE '%Remarque 3 :%' OR c.SO_COMMENT LIKE '%Opmerking 3 :%') THEN
  24.       INSERT INTO SOT_ADMIN_REMARK VALUES
  25.         (c.social_office_transaction_id, 3
  26.         );
  27.     END IF;
  28.     IF (c.SO_COMMENT LIKE '%Remarque 4 :%' OR c.SO_COMMENT LIKE '%Opmerking 4 :%') THEN
  29.       INSERT INTO SOT_ADMIN_REMARK VALUES
  30.         (c.social_office_transaction_id, 4
  31.         );
  32.     END IF;
  33.     IF (c.SO_COMMENT LIKE '%Remarque 5 :%' OR c.SO_COMMENT LIKE '%Opmerking 5 :%') THEN
  34.       INSERT INTO SOT_ADMIN_REMARK VALUES
  35.         (c.social_office_transaction_id, 5
  36.         );
  37.     END IF;
  38.     IF (c.SO_COMMENT LIKE '%Remarque 6 :%' OR c.SO_COMMENT LIKE '%Opmerking 6 :%') THEN
  39.       INSERT INTO SOT_ADMIN_REMARK VALUES
  40.         (c.social_office_transaction_id, 6
  41.         );
  42.     END IF;
  43.     IF (c.SO_COMMENT LIKE '%Remarque 7 :%' OR c.SO_COMMENT LIKE '%Opmerking 7 :%') THEN
  44.       INSERT INTO SOT_ADMIN_REMARK VALUES
  45.         (c.social_office_transaction_id, 7
  46.         );
  47.     END IF;
  48.     IF (c.SO_COMMENT LIKE '%Remarque 8 :%' OR c.SO_COMMENT LIKE '%Opmerking 8 :%') THEN
  49.       INSERT INTO SOT_ADMIN_REMARK VALUES
  50.         (c.social_office_transaction_id, 8
  51.         );
  52.     END IF;
  53.     IF (c.SO_COMMENT LIKE '%Remarque 9 :%' OR c.SO_COMMENT LIKE '%Opmerking 9 :%') THEN
  54.       INSERT INTO SOT_ADMIN_REMARK VALUES
  55.         (c.social_office_transaction_id, 9
  56.         );
  57.     END IF;
  58.     IF (c.SO_COMMENT LIKE '%Remarque 10 :%' OR c.SO_COMMENT LIKE '%Opmerking 10 :%') THEN
  59.       INSERT INTO SOT_ADMIN_REMARK VALUES
  60.         (c.social_office_transaction_id, 10
  61.         );
  62.     END IF;
  63.     IF (c.SO_COMMENT LIKE '%Remarque 11 :%' OR c.SO_COMMENT LIKE '%Opmerking 11 :%') THEN
  64.       INSERT INTO SOT_ADMIN_REMARK VALUES
  65.         (c.social_office_transaction_id, 11
  66.         );
  67.     END IF;
  68.     IF (c.SO_COMMENT LIKE '%Remarque 12 :%' OR c.SO_COMMENT LIKE '%Opmerking 12 :%') THEN
  69.       INSERT INTO SOT_ADMIN_REMARK VALUES
  70.         (c.social_office_transaction_id, 12
  71.         );
  72.     END IF;
  73.     IF (c.SO_COMMENT LIKE '%Remarque 13 :%' OR c.SO_COMMENT LIKE '%Opmerking 13 :%') THEN
  74.       INSERT INTO SOT_ADMIN_REMARK VALUES
  75.         (c.social_office_transaction_id, 13
  76.         );
  77.     END IF;
  78.     IF (c.SO_COMMENT LIKE '%Remarque 14 %' OR c.SO_COMMENT LIKE '%Opmerking 14 :%') THEN
  79.       INSERT INTO SOT_ADMIN_REMARK VALUES
  80.         (c.social_office_transaction_id, 14
  81.         );
  82.     END IF;
  83.     IF (c.SO_COMMENT LIKE '%Remarque 15 :%' OR c.SO_COMMENT LIKE '%Opmerking 15 :%') THEN
  84.       INSERT INTO SOT_ADMIN_REMARK VALUES
  85.         (c.social_office_transaction_id, 15
  86.         );
  87.     END IF;
  88.     IF (c.SO_COMMENT LIKE '%Remarque 16 :%' OR c.SO_COMMENT LIKE '%Opmerking 16 :%') THEN
  89.       INSERT INTO SOT_ADMIN_REMARK VALUES
  90.         (c.social_office_transaction_id, 16
  91.         );
  92.     END IF;
  93.     IF (c.SO_COMMENT LIKE '%Remarque 17 :%' OR c.SO_COMMENT LIKE '%Opmerking 17 :%') THEN
  94.       INSERT INTO SOT_ADMIN_REMARK VALUES
  95.         (c.social_office_transaction_id, 17
  96.         );
  97.     END IF;
  98.   END LOOP;
  99. END;
  100. BEGIN
  101. bufferCrap();
  102. END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement