Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. create or replace procedure find_expr is
  2. a number;
  3. begin
  4. for rec in (select 'select count(*) from ' || table_name || ' where ' ||
  5. column_name || ' like ''%05510%''' col_name
  6. from user_tab_columns t) loop
  7. EXECUTE IMMEDIATE rec.col_name
  8. into a;
  9.  
  10. if a > 0 then
  11. insert into find_expr_log values (sysdate, substr(rec.col_name, 22, 50));
  12. commit;
  13. end if;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement