forked from xtender/xt_scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfind_code.sql
More file actions
22 lines (20 loc) · 745 Bytes
/
find_code.sql
File metadata and controls
22 lines (20 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
accept _OWNER_MASK default '%' prompt "Owner mask[default %]: "
accept _CODE default '' prompt "Code: "
accept _CASESENS default 'NO' prompt "Casesensitive[yes/no, default=no]: "
def _IF_CASESENS="--"
def _IF_INCASESENS=""
col _IF_CASESENS new_value _IF_CASESENS noprint
col _IF_INCASESENS new_value _IF_INCASESENS noprint
col text format a400
col owner for a25
select decode(upper('&_CASESENS'),'YES','','--') "_IF_CASESENS"
,decode(upper('&_CASESENS'),'YES','--','') "_IF_INCASESENS"
from dual;
select
*
from dba_source s
where
s.owner like upper('&_OWNER_MASK')
&_IF_CASESENS and s.text like '%'||q'[&_CODE]'||'%'
&_IF_INCASESENS and upper(s.text) like upper('%'||q'[&_CODE]'||'%')
/