Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Insert using LONG data type
The problem is with sqlplus restriction of not being able to handle longs. A short pl/sql procedure with a cursor should do the trick:
declare
cursor b_cursor is select * from b; a_rec a%rowtype; begin open b_cursor; fetch b_cursor into a_rec; while b_cursor%FOUND loop insert into a values (a_rec.x, a_rec.y, a_rec.z) commit; fetch b_cursor into a_rec; end loop;
hope that helps,
rick
Allen Stennett wrote:
>
> I am having problems inserting using a "LONG" datatype. Here is an
> example
>
> INSERT INTO A(x,y,z)
> select x,y,z
> from B;
>
> I get an error saying misuse of LONG data type if "x" in table A and
> Table B are both longs. I cannot see anything in the Oracle books that
> I have read that this should be a problem. There are some restrictions
> using a LONG data type but I don't see one using it with an INSERT
> except you can't use it in the "where" clause.
>
> Thanks
Received on Wed Nov 26 1997 - 00:00:00 CST
![]() |
![]() |