How to find ?? in a view text (definition) in all schemas

Hi
DB Version Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
OS RHES 5U2
I would appreciate if someone can tell me how to get a list of all the views in the database that contains ?? in the text/definition of the view.
I tried with both DBA_VIEWS and ALL_VIEWS using following query but it returned error.
SELECT OWNER||'.'||VIEW_NAME
FROM ALL_VIEWS
WHERE TEXT LIKE '%??%'
AND owner not in ('SYS','SYSTEM','SYSMAN','DBSNMP','OLAPSYS','MDSYS','CTXSYS')
ORDER BY OWNER;
WHERE TEXT LIKE '%??%'
ERROR at line 3:
ORA-00932: inconsistent datatypes: expected NUMBER got LONG
SELECT OWNER||'.'||VIEW_NAME
FROM DBA_VIEWS
WHERE TEXT LIKE '%??%'
AND owner not in ('SYS','SYSTEM','SYSMAN','DBSNMP','OLAPSYS','MDSYS','CTXSYS')
ORDER BY OWNER;
WHERE TEXT LIKE '%??%'
ERROR at line 3:
ORA-00932: inconsistent datatypes: expected NUMBER got LONG
Thanks

WHERE TEXT LIKE '%??%'TEXT here is a LONG datatype, you cannot use it in an expression.
You could do that :
SQL> select count(*) from user_views where text like '%OPRD%';
select count(*) from user_views where text like '%OPRD%'
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected NUMBER got LONG
SQL> create table myviews (view_name varchar2(30), text clob);
Table created.
SQL> begin
  2  for i in (select view_name,text from user_views) loop
  3  insert into myviews values (i.view_name,i.text);
  4  end loop;
  5  end;
  6  /
PL/SQL procedure successfully completed.
SQL> select count(*) from myviews where text like '%OPRD%';
  COUNT(*)
       136
SQL>Nicolas.

Similar Messages

  • How to find out who's texting you from an iCloud email address?

    how to find out who's texting you from an icloud email address?

    OK after a bit of research I found a way to achieve this.
    I simply looked up the email address in ADUC, then did a search in SP with the display name. I could locate the list and manually confirm it was configured with the incoming email address I was looking for.
    I also found the below script on Stackoverflow, but got "The 'using' keyword is not supported in this version of the language." when I tried to run it. Any idea how to fix that? I'd like to have a script to link a library to an email address istead of the
    manual approach described above.
    http://stackoverflow.com/questions/4974110/sharepoint-how-do-i-find-a-mail-enabled-list-if-i-only-have-the-email
    $SiteCollection = ""
    $EmailAddress = "" # only the part before the @
    # Load SharePoint module if not done yet
    if((Get-PSSnapin | Where {$_.Name -eq "Microsoft.SharePoint.PowerShell"}) -eq $null) {Add-PSSnapin Microsoft.SharePoint.PowerShell;}
    cls
    using System;
    using Microsoft.SharePoint;
    namespace FindListByEmail
    class Program
    {a
    static void Main(string[] args)
    string siteUrl = $SiteCollection;
    string email = $EmailAddress;
    using (SPSite site = new SPSite(siteUrl))
    foreach (SPWeb web in site.AllWebs)
    try
    foreach (SPList list in web.Lists)
    if (list.CanReceiveEmail)
    if (list.EmailAlias != null && list.EmailAlias.Equals(email, StringComparison.InvariantCultureIgnoreCase))
    Console.WriteLine("The email belongs to list {0} in web {1}", list.Title, web.Url);
    Console.ReadLine();
    return;
    finally
    if (web != null)
    web.Dispose();

  • How to find the difference in object definition between two databases

    Hi,
    Can any one suggest me how to find the difference in object definition between two different databases. Is there any tool or by OEM? If so how?
    Regards
    Naveen

    this link may be helpful...
    http://www.dbspecialists.com/scripts.html

  • How do I backup and view text messages from my iphone 4?

    How do I backup and view text messages from my iphone 4? I want to know where and how to backup and view text messages and all other personal files, including voicemail, recent calls, etc. from my iphone. Is this function in iTunes and/or does iTunes already backup this stuff when I sync?
    I really just want the answer to how and where this works.
    Thanks

    Apple provides functionality in the backup done via iTunes to backup the device and text messages.  There is no functionality to view the text messages on the computer.
    About iOS backups
    Other programs are available which can extract text messages from the device or the iTunes created backup and then be viewed on the computer.  To my knowledge, no program exists which can force backed up text messages into the device once they've been removed.
    Google is your friend when looking for 3rd party software related to text messages.

  • How to find List of views that material type supports?

    Hello Gurus,
    How to find List of views ( Basic Data1, Basic Data2, Sales org1, sales org2, etc.. ) for material types.
    is there any table or something to find.
    Thanks & Regards
    Raj

    You can search the function module SELECTION_VIEWS_FIND in this forum. You will get the sample code.
    Apart from that if only you want to know what are all the views assigned to a material type and try to enhance it then it should be from SPRO.
    Go to transaction SPRO.
    chose Logistics - General>Material Master>Basic Settings>Material Types>Define Attributes of Material Types
    execute and you will get the list of material types.
    Now dbl click on the desired material type and you will get an area called as User departments. Here what are all the views are selected those views only appear while you are trying to create (or Change/Display) material master.
    Regards
    Shiba Prasad Dutta

  • How to find the list of existing tables in a schema using DB link?

    Hi
    I know how to find the list of existing tables in a schema using the following query
    SQL> select * from tab;
    but, how to list the tables using a DB link?
    For Example
    SQL> select * from tab@dblink_name;
    why this doesn't work?
    Pl advice me
    Thanks
    Reddy.

    ORA-02019: connection description for remote database not foundHave you used this database link successfully for some other queries?
    The error posted seems to indicate that the DB Link is not functional at all. Has it worked for any other type of DML operation or is this the first time you ever tried to use the link?

  • HT3529 how to do i send a text conversation with all the detail to my email?

    How to do I send a text conversation with all the detail from my phone to my email?

    Take a screen shot of the text.  Hold the home/sleep button together for a sec.  Then go to your camera roll and then email it to yourself.

  • HOW 2 FIND WHICH FIELD IS CONTAINED IN WHICH ALL TABLES?

    FRIENDS CAN U PLEASE TELL ME THE COMPLETE PROCEDURE FOR HOW 2 FIND THAT FIELD AUFNR IS IN WHICH ALL TABLES....I KNOW WE USE WHEREUSED LIST BUT HOW?
    REGARDS
    ESSAM ([email protected])

    Dear Khan,
    <b>--> Goto transaction SE16
    --> Give table DD03L (click --> table contents)
    --> give field name (Ex: AUFNR) & Execute
    --> And you will get all the table names.... which contain field AUFNR.</b>
    Reward Points for useful Answers.
    Regards,
    Moqeeth.

  • How to find last executed query on database and or schema.

    hi,
    how to find last executed query on database and or schema.
    yours sincerely

    Sessionwise if you wanna see means use v$session.. Because it will show execution time also so you can analyze it easily and get sql based on SID and serial number ..
    Try :
    select * from v$session;
    Regards..

  • How to find my lost iphone4 if someone erase all content and settings ?

    how to find my lost iphone4 if someone erase all content and settings ? there is way to find my iphone with serial number ?

    No. However, if your phone was running iOS 7.0 or higher, whoever erased it won't be able to re-activate it without knowinh your Apple ID/Password. Called Activation Lock, & the phone will be useless to whoever has it.

  • How to find unassigned master data text objects in process chain in bi

    Hi
    Please let me know how to find the unassigned master data text objects in process chain.

    hi,
    actually if u want to find that , is ur Unassigned Infoobject in present in process chain or not, , that u can find out just by right
    click on your DTP (master data Txt datasource--> Master data text ), if this is present in Process chain, then on ryt click, the process chain option will be active. by clicking over that u can find the name in which this exists.
    thanks.

  • How to find and replace certain text in Excel.

    I am new to Automator. And I would like some help how I can create a service that will allow me to find and replace certain text in Excel. I noticed that there is an action to do this for Word documents, but not for Excel documents.
    Any suggestions how I can do this?
    Thanks so much for your help.

    Marga,
    I think the best place to ask about Office for Mac would be in the MS forums.
    Jerry

  • How to find the FND_PROFILE.VALUE(ORG_ID) in custom apex schema

    Hi,
    How to find the FND_PROFILE.VALUE('ORG_ID') from dual in custom schema......
    Actually I have integrated Apex 4.2 version with EBS r12
    select FND_PROFILE.VALUE('ORG_ID') from dual ; in apps schema I m getting 198 value
    but the same query(select  apps.FND_PROFILE.VALUE('ORG_ID') from dual ) in custom schema (XXCVBB) returning null value..
    Is there  any pre steps I have to do...
    kindly provide the useful inputs to retrieve the profile value..........
    Regards,
    Pavan

    Hi,
    fnd_profile.value('ORG_ID'); will fetch you value only if there is a organization assigned to any application [or only if its  a single Org], being it custom application you should have used set policy context or mo_global.init to populate the global temporary table which will hold all the Org's which that specific user has access too.
    in your custom code use MO_GLOBAL.SET_POLICY_CONTEXT('S','ORG ID WHICH YOU NEED TO SET');
    after setting the policy context, you should be able to see value from fnd_profile.value('ORG_ID');
    Hope this Helps!!
    MO_GLOBAL.SET_POLICY_CONTEXT
    This procedure has two parameters
    p_access_mode
    Pass a value "S" in case you want your current session to work against Single ORG_ID
    Pass a value of "M" in case you want your current session to work against multiple ORG_ID's
    p_org_id
    Only applicable if p_access_mode is passed value of "S"
    MO_GLOBAL.INIT
    Purpose of mo_global.init :-
    It will check if new Multi Org Security Profile is set, to decide if new Security Profile method will be used.
    If the new MO security profile is set, then mo_global.init inserts one record, for each Organization in Org Hierarchy, in table mo_glob_org_access_tmp
    Regards,
    Yuvaraj

  • How to find my lost iphone4 if someone erase all content and settings ? there is way to find my iphone with serial number ?

    how to find my lost iphone 4 if someone erase all content and settings ? there is any way to find my iphone with serial number or any other number to find it ? plese answer my 

    Answered here:
    https://discussions.apple.com/thread/5934691?tstart=0
    No matter how many times you ask, the answer still remains no.

  • How to find out height of text, given width?

    Hello, I apologize in advance for this must be a stupid question, but I just can't seem to find an answer in the docs...
    If I have a text (string + font information), and I know how wide the display will be, how do I find the height??
    The solution I know of (adapted from camickr code), works, is a hack using a phantom JFrame - see the method showHeight. This is the kind of code that my first college programming professor would call "Mark, your code is ugly and miserable". How to do this right? (or is this the only way)
    import java.awt.*;
    public class Foo
         public static void main(String[] args)
              showHeight("FOOBAR FOOBAR FOOBAR FOOBAR FOOBAR FOOBAR ", new Font("Arial", Font.BOLD, 12), 100);
         public static void showHeight(String s, Font f,  int width)
              JFrame frame = new JFrame();
              JTextPane txt = new JTextPane();
              Rectangle r = null;
              txt.setFont(f); 
              txt.setText(s);
              Dimension dim = txt.getPreferredSize();
              frame.setContentPane(txt);
              dim.width = width;
              txt.setPreferredSize(dim);
              frame.pack();
              try
                   r = txt.modelToView(txt.getDocument().getLength());
              catch (Exception exc)
              System.out.println("height is " + (r.y + r.height));
    }

    This is not a trivial problem
    To start with, you definitely need to know
    #1 What Font (family, size, style) are you using? This is assuming you are just using 1 font. More than 1 font makes it much much more complicated.
    #2 How are you doing line breaks? Are you doing line breaks just on whitespace characters, or on any character?
    Now you need to find out how many lines there are going to be. Start by getting the FontMetrics for the Font. You should use getCharWidth('W') or getCharWidth('0') to get a rough estimate of how many characters any line can contain. Then you need to go through your text and figure out how many lines there are, not using the guess you calculated above, but using FontMetrics.stringWidth()

Maybe you are looking for

  • How to see programming Code for UCCX Script

    Hi All, How can I  see the programming Code for UCCX Script? I have a script and want to see its Code , something like : int sum = 0; boolean alternate = false; boolean isValid = false; try { int i = 0; for (i = ccnumber.length() - 1; i >= 0; i--) {

  • Price control

    Hi All, I am new to SAP MM, What is the main difference between standard price and moving average price, And While I am creating the Material  (Material Type is Drinks) it will take Moving Average Price(V) Only, We cant able to change this, Why? Than

  • Webcam setting 1.0 not working

    i just bought webcam setting from App store and it not working fully the exposure mode is not enable and focus option is not enable as well. can any one plz tell me why it isn't working . after all i bought then y it isn't working fully?

  • Adobe InDesign Export Font problem

    i use InDesign cs6 to work on magazine and now when i try export the magazine to pdf [ Print ] i get this error and when i try export to pdf [ Interactive ] i get this error Anyone please can tell me how to avoids this error without change the font o

  • I haven't dropped or damaged my Ipod, but it suddenly won't connect to the comp. to charge. Anybody help?

    One day my Ipod just wouldn't charge for some reason. I got my daughters cord to see if there was something wrong with mine, but it still wouldn't charge. A couple days later, I was wiggling the cord and it connected and charged, and when I disconnec