Re: Transferring LONG RAW from TAB1 to TAB2
Date: Fri, 17 Sep 1999 21:05:39 GMT
Message-ID: <7ruaes$s5u$1_at_nnrp1.deja.com>
[Quoted] In article <37E10FD1.F00D0715_at_theleme.com>,
Yann Chevriaux <chevriaux_at_theleme.com> wrote:
> I would to know how to copy a LONG RAW column from a table to another.
>
> The following based function failed with:
> ORA-00997: illegal use of LONG datatype
>
> function ArchiveRawData(dataId in number)
> return number
> is
> newArcId number;
> begin
> newArcId := NewId; -- NewId is a based function that return an UID
>
> insert into rawArchive (id, rawdata)
> select newArcId, rawdata
> from rawCurrent
> where id = dataId;
>
> return newArcId;
>
> end;
>
> I thought it could be a PL/SQL limitation but even with a simple SQL
> statement it fail as well.
>
> Configuration: NTServer; Oracle 7.3.2
>
> Please help !!!
>
>
[Quoted] Use PL/SQL instead :
function ArchiveRawData(dataId in number)
return number
is
newArcId number;
newData rawCurrent.rawdata%TYPE;
begin
newArcId := NewId; -- NewId is a based function that return an UID
[Quoted] select rawdata into newData from rawCurrent where id = dataId;
[Quoted] [Quoted] insert into rawArchive (id, rawdata) values(newArcId,newData);
return newArcId;
end;
[Quoted] Good luck. Michael.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Fri Sep 17 1999 - 23:05:39 CEST