Script to Search the Related Vales in View

Script to Search the Related Vales in View

DECLARE
   v_text   VARCHAR2 (32000);
BEGIN
   FOR i IN (SELECT VIEW_NAME, text, TEXT_LENGTH
               FROM ALL_VIEWS
              WHERE VIEW_NAME LIKE '%XX%' AND TEXT_LENGTH < 31000)
   LOOP
      v_text := i.text;

      IF    (INSTR (UPPER (v_text), 'SERVIC') > 0)
         OR (INSTR (UPPER (v_text), '90') > 0)   
         OR (INSTR (UPPER (v_text), 'DEPL') > 0)
         OR (INSTR (UPPER (v_text), 'CONS') > 0)
         OR (INSTR (UPPER (v_text), '1265') > 0)
         OR (INSTR (UPPER (v_text), '2365') > 0)
         OR (INSTR (UPPER (v_text), '2569') > 0)
         OR (INSTR (UPPER (v_text), 'XX_V') > 0) -- Give Object Name
      THEN
         DBMS_OUTPUT.put_line (i.view_name);
      END IF;
   END LOOP;
END;

Comments

Popular posts from this blog

Deleting the Sourcing Rule Assignments API

BarCode with XML Publisher