search for text in views [message #649291] |
Mon, 21 March 2016 08:43 |
desmond30
Messages: 41 Registered: November 2009
|
Member |
|
|
I am trying to search for a particular reserved word in all of the views used in our schema, how can i do that, the text for views
in all_views is CLOB, I tried dbms_metadata
select DBMS_METADATA.GET_DDL(object_type => 'VIEW', name=>'MYVIEW',schema=> 'MYSCHEMA') from DUAL;
This still gives me the text in CLOB, How can I scan all the views in MYSCHEMA and search for the availability of a string "ABC" (Or any reserved word)?
|
|
|
|
|
|
Re: search for text in views [message #651060 is a reply to message #649298] |
Tue, 10 May 2016 11:29 |
Solomon Yakobson
Messages: 3273 Registered: January 2010 Location: Connecticut, USA
|
Senior Member |
|
|
Barbara, INSTR isn't right tool for search here. It can trigger false positives on literals containing reserved word or identifiers where keyword is part of the name. And if skipping reserved word as part of a name can be resolved by using regexp, skipping reserved word in literals is much more difficult task. But main question is if OP is really looking for Oracle reserved words. It doesn't make sense since Oracle wouldn't let creating view with reserved word in the first place. So it is either a keyword or non-Oracle reserved word.
SY.
|
|
|