Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Appending data to a LONG field
Shaun Mallory wrote:
>
> I have a table that has a LONG field that is used to store long bits of
> text. I am wanting to append a bit of text onto the front of the text
> that already exists in the field. I tried:
>
> UPDATE Table
> SET Text_Field = 'My New String ' + Text_Field
> WHERE etc....
>
> and I got the error ORA - 00932 Inconsistent Datatypes
>
> Then I tried and got the same result:
>
> UPDATE ....
> SET Text_Field = ' My new String' + TO_CHAR(Text_Field)
> WHERE ...
>
> I'm sure I can come up with a way to extract the data from the field
> into a variable, add my new string and update the field with the new
> complete string. This could become problematic if the LONG field gets
> very large. Is there a way to append new text onto the LONG field in an
> efficient manner.
>
> Please help me out
>
> Shaun
> smallory_at_ehv.sc.philips.com
Try using concatenation operator '||', instead of numerical addition '+'.
-- Thomas Griffin Project Leader QUALITECH Systems, Inc. tgriffin_at_qualitech.comReceived on Fri Feb 21 1997 - 00:00:00 CST