Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to copy LONG column
Tom Wilson <tdwilson_at_mindspring.com> writes:
>I need to copy a long varchar from one table to another using
>UPDATE tab1 SET longcol = (SELECT longcol2 FROM tab2 WHERE
>tab1.key=tab2.key);
>But I get an error that this is an invalid use of a LONG column. How do
>I insert or update a long column by copying a value from another column?
>Tom
The only way I have been able to do this is to use PL/SQL. Define a variable as LONG and open a cursor into the variable. From here you can manipulate the variable in ways you cannot with straight SQL. Things such as substr, rtrim, instr, length, etc.
I hear Oracle8 will be able to handle LONG manipulations in SQL.
-Ari Kaplan
Independent Oracle DBA Consultant
<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-> <-> For 60+ technical tips, visit my Web Page: <-> <-> <-> <-> http://homepage.interaccess.com/~akaplan <-> <-> <-> <-> email: akaplan_at_interaccess.com <-> <-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->Received on Wed May 21 1997 - 00:00:00 CDT
![]() |
![]() |