Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Problem of using LONG datatype in SQL

Re: Problem of using LONG datatype in SQL

From: terryg8 <trg_at_ibm.net>
Date: 1997/07/17
Message-ID: <33CEA4AD.2C65@ibm.net>#1/1

> Maoz Mussel <mmussel_at_iil.intel.com> wrote in article
> <33C9D43C.6DD0_at_iil.intel.com>...
> I want to run queries based on a LONG field in the where clause, but
> since this datatype could not be used in the where statement, I cannot
> run such a query:
> SELECT * FROM table_name WHERE description LIKE '%string%';
> where description is a LONG datatype.
>
> Other problem is when I'm trying to run such a statement:
> INSERT INTO tmp_table SELECT * FROM table_name;
> Once again, when one of table_name fields is a LONG datatype, I got the
> following error message:
> ORA-00997: illegal use of LONG datatype
>
> I guess I'm not the first one to fase this problem, so if you know of a
> solution, or at least a workaround, please let me know. I cannot replace
> this field to a VARCHAR2 type, since it should hold a large amount of
> charachters, but any other idea will be great.
>

You could dump the rowid and long data into a file and do some stuff with the utl_file package. It could all be done within a plsql procedure. There may certainly be more elegant approaches. For the insert, you can use cursors, fetching row elements including longs from the first table for insertion into the second. Cheers,
Terry Received on Thu Jul 17 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US