Appending to a long column
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Appending to a long column

  1. #1
    Join Date
    Oct 2001
    Posts
    1
    Hi,

    I have a table with a LONG column that contains text over 4000 characters. This text is entered through a third party application so I cannot change the table structure. I want to append some text at the end of the existing data, how can I do that through PL/SQL or just plain SQL in SQLPlus. The Oracle version is 8.1.7 on Sun Solaris.

    Thanks,

    Nauman

  2. #2
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    create table xxx ( empno number , name_long long);

    insert into xxx values (1, 'Tamil');
    insert into xxx values (2, 'Kannan');
    commit;

    create or replace procedure yyy as
    pname long;
    cursor c1 is select empno, name_long from xxx;
    begin
    for c1_rec in c1 loop
    pname := c1_rec.name_long||' Selvan';
    update xxx set name_long = pname where empno = c1_rec.empno;
    commit;
    end loop;
    end;
    /

    I hope the above example will help you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width