How do I seach a LONG datatype in a table?

Using Oracle 9.2.0.6.
I'm trying to search the TEXT column of the ALL_VIEWS DBA table for a view that contains a string.
select view_name from all_views
where upper(text) like '%FTBV_BOOK_SVC_ACTIVITY_ALL_V%';Throws up an error. I looked the object up ans it states that the LONG type can't be used in a where clause.
How do I get around this?
Thanks!
Edited by: user10382685 on Jan 29, 2009 8:35 AM

Michael,
Thanks for the code. I rewrote the statement to fit my needs as the following.
select * from all_views
where dbms_xmlgen.getxml('select text from all_views where view_name = ''' || view_name || '''
and owner = ''APPS''') like '%ftbv_salesrep_all_1d%'
and owner = 'APPS';My goal is to list out all of the views where this table is used.
The Query DOES complete and DOES return a view, however it only returns one view that contains this search string.
When I try to 'guide' the query to return a view that I know contains this very same search string I get no rows returned.
select * from all_views
where dbms_xmlgen.getxml('select text from all_views where view_name = ''' || view_name || '''
and owner = ''APPS''
and view_name = ''FTBV_BOOK_SVC_ACTIVITY_ALL_V''') like '%ftbv_salesrep_all_1d%'
and owner = 'APPS'
and view_name = 'FTBV_BOOK_SVC_ACTIVITY_ALL_V';In other words I know that 'ftbv_salesrep_all_1d' exists in the definition of the view FTBV_BOOK_SVC_ACTIVITY_ALL_V
but this query won't acknowledge that.
Any suggestions?
Thanks Again

Similar Messages

  • Long Datatypes in Reports

    I have a field of long datatype in a table. I need to display the first 200 characters of this field in a report.
    How can I do this. If it is thru Placeholder columns can you explkain in detail how I should go about this.
    null

    It was in the 8i migration guide (http://download-uk.oracle.com/docs/cd/A87860_01/doc/server.817/a86632/migaftrm.htm#6573), but we decided to get to 10g first and then take care of it (since we did a 7 to 10 upgrade in two steps, 7->8 and 8->10).
    So basically I should just leave the SYSTEM tablespace objects alone then? I only tried the system objects conversion on a test database, and since the non-system objects were fine, we converted them on production but left the system ones alone.

  • How to get length of data on column with long datatype

    How to get length of data on column with long datatype without using pl/sql block

    ...another reason not to use LONG datatype for columns.
    Oracle advises to switch to LOB columns instead
    SQL> create table t
      2  (x long)
      3  /
    Table created.
    SQL> insert into t values (rpad ('x', 10000, 'x'))
      2  /
    1 row created.
    SQL> alter table t
      2  modify x clob
      3  /
    Table altered.
    SQL> desc t
    Name                                      Null?    Type
    X                                                  CLOB

  • How to select data(first 10 charcters) from a LONG datatype column.?

    Hi,
    I am getting below error wile i am trying to select forst 10 charcter from a log datatype column. May be I am using it in a wrong way using SUBSTR function.
    I dont know whether SUBSTR works for LONG columns or not as it's char function.
    I am not able to find any inbuild conversion function which will work like TO_CHAR.Please revert.
    My steps:-
    =================================================
    SQL> create table long_varchartest(
    2 nirav long, sangram varchar2(30));
    Table created.
    SQL> insert into long_varchartest values('ns89027','sd22712');
    1 row created.
    SQL> insert into long_varchartest values('Nirav Shah', 'Sangram Dash');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from long_varchartest;
    NIRAV SANGRAM
    ns89027 sd22712
    Nirav Shah Sangram Dash
    SQL> insert into long_varchartest(sangram)
    2 select nirav from long_varchartest;
    select nirav from long_varchartest
    ERROR at line 2:
    ORA-00997: illegal use of LONG datatype

    declare
    l_text varchar2(4000) ;
    begin
      select nirav into l_text from  long_varchartest where sangram = 'sd22712';
      dbms_output.put_line(substr(l_text,1,10)); 
    end ;you could also follow this link [http://www.oracle.com/technology/oramag/code/tips2003/052503.html]

  • A question about 'long' dataType in NT platform

    Why the maximum of the 'long' dataType in NT
    paltform is only 4k? I looked up some Oracle
    reference books which told me the maximum must be 2G.
    My Oracle version is 8.0.5.0.0
    Thanks for your advice if you can help me to solve this question.

    Hi,
    how did you figure out, the size of long?
    In PLSQL the maximum for a varchar2 is 4k.
    You have to use varchar2 to retrieve the long content. But look at dbms_sql, there are procedures to extract portions of long columns.
    HTH
    Detlev
    null

  • Exporting a table with Long datatype col. name

    Hello,
    I need help exporting a table, One of the column is long datatype.
    How can I do this without using Export Util?
    Is it possible.
    (If someone has a solution then PLEASE Email
    me)
    URGENT.
    Thanks.
    Pankaj Patel.

    Just wanted to find out, if you already solved this problem. I have a similar issue with long column. I am trying to sql dump a table with long column that will be imported into another database(probably using sql*load), but the spooled file puts the data from the long column in separate lines 80 char long and not on a single line. I have set the long to 64000 and linesize to 32000. Wrap is on too.
    null

  • Illegal use of LONG datatype

    While I was insert a rows into the same table I am getting an error. I am having one long column in table list. I am getting following error while I was inserting a row.
    ORA-00997: illegal use of LONG datatype
    Please let me know how do I insert long data type values for this kind of insert.

    [duplicate thread|http://forums.oracle.com/forums/message.jspa?messageID=3770321#3770321]

  • How can i get a LONG RAW size? Please help me.

    Hi,
    I have one table (record) that contain 2 fields,
    image as LONG RAW and staffid as string.
    How can i make the select statement to get the actual size for each image?
    I have try to do " Select dbms_lob.getLength(image) as actualsize,staffid from record " ,
    but it get error "ORA-00997:illegal use of LONG datatype"
    Can any body help me ?thanks
    Message was edited by:
    user450549

    LONG RAW and BLOB are very different data types. Oracle has been suggesting for quite a while that folks migrate from LONG RAW to BLOB-- it's much easier to work with BLOB data than LONG RAW data...
    How much data, roughly, do you have in these columns. If it's relatively small, you may be able to use UTL_RAW.LENGTH. If it's longer, though, I believe you have to write a program that reads all the data and calculates the length as you go, which is obviously not particularly efficient...
    Justin

  • Extracting clob/blob/long datatypes in delimited file

    I have a few tables in database that have clob/blob/long datatypes. I need to unload this data into delimited file and reload the data into another database. I don't want to use export/import.
    Currently the code that i have can handle varchar2, number, date datatypes quite easily using sqlloader.
    The tables are not too big (hundred to 10k rows approximately) and performance is important but not crucial. The script can run for a few minutes unloading data, that is fine. Code maintenance is of higher priority with pl/sql being the preferred scripting language.
    From the sqlloader manual, i glean that use of special delimiter is important, something like <startlob> and <endlob> .
    I need ideas on how to do this.

    Hi Buddy.
    I am having same kind of Problem. I am using very similar procedure Instead of PUT_RAW I am using put line.
    Writing is not a problem after writing the image into a file I cannot open that. That means Image got corrupted. If you find out some solutions for your problem please help me
    My email id is [email protected]
    Thanks
    AJI

  • How to insert records with LONG RAW columns from one table to another

    Does anybody know how to use subquery to insert records with columns of LONG RAW datatype from one table to another? Can I add a WHERE clause in the subquery statement? Thanks.

    Insert into ... Select statements are not supported for long or long raw. You will have to either use PL/SQL or convert your long raw to blobs.

  • Need a Help building Longer datatypes

    Hi Friends,
    I have a Complex problem right now.
    I am trying to build a longer datatypes of an unsinged interger where in we can specify the length of it where in we can specify number of bits required to store the data and is this is exceeding the long int data type of c++.
    I tried to build this by using the concepts of unsigned integer algorithm.
    I would really appericiate if some one can help me in converting it too java.
    One of the main difficulties i am facing right now is i do not have any idea about how to overload Arithmatic operators like (+,-,*,/ ,% ....) in java.
    I would really grateful if somebody can help me in this regards....
    Thanks in adavance!!!
    Regards,
    RAHUL

    Hi Friends,
    I have a Complex problem right now.
    I am trying to build a longer datatypes of an
    unsinged interger where in we can specify the length
    of it where in we can specify number of bits required
    to store the data and is this is exceeding the
    long int data type of c++.
    I tried to build this by using the concepts of
    unsigned integer algorithm.
    I would really appericiate if some one can help me in
    converting it too java.BigInteger?
    >
    One of the main difficulties i am facing right now is
    i do not have any idea about how to overload
    Arithmatic operators like (+,-,*,/ ,% ....) in
    java.
    That's 'cause java doesn't support operator overloading.
    I would really grateful if somebody can help me in
    this regards....
    Thanks in adavance!!!
    Regards,
    RAHUL

  • Accessing Long datatypes using JDBC

    Can any body help me how to access long datatypes in JDBC. I need to store large data in String object arround 100000 length string in long. as of now with pstmt.setString(1,String ) i am able to insert 32700 length string only . how can i over come this. ?
    please provide me some code for my problem .
    thanks in advance.......

    Which DB?
    Which DB field type?
    Which JDBC driver?

  • Error when using LONG Datatype

    Hi,
    I am transferring data from oracle to oracle. In my source table and target table i have a column of "long" datatype. When i execute the interface i am getting the following error.
    997 : 42000 : java.sql.SQLException: ORA-00997: illegal use of LONG datatype
    Cause: A value of datatype LONG was used in a function or in a DISTINCT, WHERE, CONNECT BY, GROUP BY, or ORDER BY clause. A LONG value can only be used in a SELECT clause.
    How can we resolve this issue in ODI?
    Thanks in Advance,
    Ram Mohan T

    Cezar,
    I am bit confused with the steps.
    1)     Create first interface with IKM Control append and flow_control yes but no long mapping
    This is the real interface to be created with out the Long Column mapping.
    2) Create second interface with IKM PL/SQL and "flow_control" NO and a "not exists "filter to "E$" (from first interface)
    Do I need to duplicate the same mapping here. I couldn’t understand this line Cezar. “and a "not exists "filter to "E$" (from first interface)”
    Does ODI doesnt provide any direct way to resolve this issue? When ever a table with Long datatype, do we need to do this steps?
    Thanks in Advance,
    Ram Mohan T

  • Oracle Long dataType = a long text String?

    Hi all.
    I'm in the middle of writing a servlet that uses JDBC to connect to an Oracle DB. I need a field in Oracle to store a varchar2 type String without the 4000 characters limiation. I picked Long datatype as it 'stores CHAR data of variable seize up to 2 GB' as said in documentations.
    The problem is, I don't know how to put it in the prepareStatement. Would it be a prep.setString or something else? I would be grateful if anyone can tell me what I can do and whether if setting a Long is correct.
    Connection con = DriverManager.getConnection(url, loginPwd, loginPwd);
    PreparedStatement prep = con.prepareStatement(INSERT INTO chanEvents VALUES (?,?,?,?));
    prep.setInt(1, nextVal);
    prep.setString(2, eventName);
    prep.setString(3, dateString);
    //?? the following is where Oracle column is set to LONG. 
    //Should I use setString or something else?
    // let say longString is a very long String
    prep.setString(4, longString);
    if (prep.executeUpdate() != 1)      {
            out.println("Bad update");
            con.close();
            prep.close();
            return false;
    con.close();
    prep.close();

    http://technet.oracle.com/sample_code/tech/java/sqlj_jdbc/htdocs/templates.htm#Streams
    Jamie

  • Selecting From Column with Long Datatypes

    create table temp
    a long
    insert into temp values ('abc');
    commit;
    select * from temp
    where a = 'abc'
    I am getting the following error while am tring to select a = 'abc';
    ora-00997 : illegal use of LONG datatype
    How can i select values from a column with long datatypes

    insert into temp values ('abc');
    cannot (must not) work, when the column is type long (thats a numeric type!!)
    -> here you get an ora- 00911 errorcode
    that the select doesn't work then should be clear.
    mfg f.humer

Maybe you are looking for

  • Cannot place a two-channel spot color image in ID CS2

    I have a psd file that consists of two pantone spot channels. When I try to place it in indesign, it says "Cannot place this file. No filter found for requested operation." Why is this, is there any help? I have to find a way around it, I need to mak

  • Nokia C3-01 Data counter error

    I've updated my C3-01 to v7.51 and it completely messed up with the data counter. Earlier it used to maintain the count even when the data usage was in GB. Now it resets itself after every 1GB. It defeats the purpose of data counter completely as in

  • Jumping sidebar in Internet Explorer

    I'm very much a newbie to Dreamweaver and HTML. I've created a website with a side menu that works perfectly on Safari. However, on PC machines, with Firefox and Explorer, the width of the side menu expands and contracts depending on where the mouse

  • Unable to initialize SCI Page.

    I've written a ton of crawlers and have never come across this issue before. I'm in the process of implementing a java crawler however when Im trying to create the content source I recieve the following in PTSpy. Calling Initialize method for SCI edi

  • N series and car kits

    I am newbie so wasnt sure where to post this. I am considering an N70 but have an old Car kit (I think its a CARK-91) Is there an adaptor like an EVO converter that is compatible for this and any of the N series yet? I dont want to have install a who