Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: long fields - create table xyz as select ... doesnt work
Guten Tag, Josef.
LONG datatypes have caused problems for me in the past. I bet if I did a little research it would tell me it has to do with the physical storage of LONG. Copying tables using the SELECT * method of CREATE TABLE is really nice, but I don't know how to easily get around the LONG datatype problem using it.
<update cursor example>
declare
cursor mikecur is
select * from mikelong;
begin
for mikecur_rec in mikecur loop
update mikelong2
set longfield = mikecur_rec.longfield
where prikey = mikecur_rec.prikey;
end loop;
end;
Depending on how you create the parameters for the stored procedure, it should be low maintenance.
Viel Gluck!
mike.
Josef Graef wrote:
>
> We are facing a problem when we try to create a new table using the 'AS'
> keyword such as :
>
> CREATE TABLE temp_table AS SELECT * FROM original_table
>
> when the table original_table contains a field with the datatype LONG.
>
> If the table doesn't contain a field with this type everything works
> fine, that means the table
> temp_table is created and all the data of table original_table is
> inserted into temp_table.
> We need a possibility to move the whole data of table original_table
> into a temporary table,
> destroy original_table, create a new table with the name original_table
> (maybe with a
> different structure) and as the last point move the data from temp_table
> back to the new
> original_table.
> Is there any solution or a workaround ? (We need this long fields in
> special tables !!!)
>
> Thanks in advance
***Views expressed are not necessarily those of my company...
--
/------------*------------\
| Michael Langholz | | DBA/Programmer | * NeoMagic Corporation * | (408)988-7020 x483 |