As I have not been near the older versions of Oracle for what seems like decades now I am having great trouble trying to achieve what should be simple.
I am working with a third party Oracle 9i based application that uses those wonderful LONG columns everywhere. As it is a third party application I am unable to update the columns to CLOBs and i need to acieve the following:
i need to update a remarks column (LONG) by adding some additonal text, e.g. UPDATE
Set REMARKS = REMARKS|| but I receive the ORA-00932: inconsistent datatypes: expected NUMBER got LONG error message.
How can I update a long column? Metalink and web searches have so far failed me so I am hoping somewhere out there can remember far enough back to tell me how to do this.
Regards
Chedgey
Solution: How to update LONG column in Oracle 9i
Mine isn't much prettier: ------------------------------------------ drop table tab1;
create table tab1( col1 long );
insert into tab1 values ('Hello'); insert into tab1 values ('Goodbye'); commit;
declare myLong long; begin for i in ( select rowid, col1 from tab1 ) loop myLong := i.col1 || ' World'; update tab1 set col1 = myLong where rowid=i.rowid; end loop; end; /