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

Home -> Community -> Usenet -> c.d.o.server -> LONG COLUMN updates (8.0.5)

LONG COLUMN updates (8.0.5)

From: Jeremy Ovenden <jovenden_at_hazelweb.co.uk>
Date: Fri, 1 Oct 1999 07:52:08 +0100
Message-ID: <7t1qd2$2jq$1@gxsn.com>


What exactly does the mesg ORA-01461 mean? The manual explains it:

ORA-01461: can bind a LONG value only for insert into a LONG column Cause: An attempt was made to insert a value from a LONG datatype into another datatype. This is not allowed.
Action: Do not try to insert LONG datatypes into other types of columns.

See the folowing simple pl/sql block

declare

cursor c
is
select long_text
from table1
for update of long_text;

r c%rowtype;

v_nt long;

i number:=0;

begin

  open c;
  loop
    fetch c into r;
    exit when c%notfound;
    i:= i+1;

    v_nt := replace(r.long_text,'===',null);

    update table1
    set long_text = v_nt
    where current of c;

  end loop;
  dbms_output.put_line('#recs '||i);
  close c;
end;
/

When I run this, it will execute no problems. However, when I simply changed the replacement text from '===' to simply 'it', Oracle comes back with the ORA-01461 message. Any ideas what could be causing this? Is it possibly a bug, or am I mis-coding something here?

Thanks.........

Jeremy Ovenden Received on Fri Oct 01 1999 - 01:52:08 CDT

Original text of this message

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