Oracle 8.0 Copy long from 1 table to another

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jcwhui

    Oracle 8.0 Copy long from 1 table to another

    Hello all,

    Yes, it is another Oracle 8.0 question. We are just too small to force our
    customer to migrate to newer Oracle.

    My problem is I need to copy the value of the long column in table A to
    another table B's long column.

    Unfortunately, "insert into table_a select long_column from table_b"
    doesn't work. I also thought of changing table_a's long column to clob,
    and convert table_b.long_co lumn to clob before inserting into table_a, but
    to_lob() doesn't exist in Oracle 8.0.

    So is this my only option: dumping table_b.long_co lumn to a file and
    loading it back to table_a.long_co lumn?

    Thanks in advance!!!


    - Will
  • Dale Edgar

    #2
    Re: Oracle 8.0 Copy long from 1 table to another

    On Tue, 30 Sep 2003 20:55:26 GMT, jcwhui
    <j_c_w_h_u_i@ho t_mail.companyw rote:
    >My problem is I need to copy the value of the long column in table A to
    >another table B's long column.
    >
    >Unfortunatel y, "insert into table_a select long_column from table_b"
    >doesn't work. I also thought of changing table_a's long column to clob,
    >and convert table_b.long_co lumn to clob before inserting into table_a, but
    >to_lob() doesn't exist in Oracle 8.0.
    >
    >So is this my only option: dumping table_b.long_co lumn to a file and
    >loading it back to table_a.long_co lumn?
    Investigate the use of the SQLPlus COPY command. This can transfer
    longs.

    Here's a link to the FAQ: http://www.orafaq.com/faqplus.htm#COPYLONG

    Kind regards
    Dale

    Need to get the DDL out of a schema (or database)? Check out our
    freeware DBATool. http://www.DataBee.com/dt_home.htm

    Comment

    • jcwhui

      #3
      Re: Oracle 8.0 Copy long from 1 table to another

      Dale Edgar <Dale@DataBee.c omwrote in
      news:tctknvg1ah vp1ga310pd1fhn1 qsd90avip@4ax.c om:
      On Tue, 30 Sep 2003 20:55:26 GMT, jcwhui
      <j_c_w_h_u_i@ho t_mail.companyw rote:
      >
      >>My problem is I need to copy the value of the long column in table A to
      >>another table B's long column.
      >>
      >>Unfortunately , "insert into table_a select long_column from table_b"
      >>doesn't work. I also thought of changing table_a's long column to clob,
      >>and convert table_b.long_co lumn to clob before inserting into table_a,
      >>but to_lob() doesn't exist in Oracle 8.0.
      >>
      >>So is this my only option: dumping table_b.long_co lumn to a file and
      >>loading it back to table_a.long_co lumn?
      >
      Investigate the use of the SQLPlus COPY command. This can transfer
      longs.
      >
      Here's a link to the FAQ: http://www.orafaq.com/faqplus.htm#COPYLONG
      >
      Kind regards
      Dale

      I doubt this will work for me. My code is inside a stored procedure. And
      in fact I meant to copy 1 particular row from table_b to table_a, i.e.
      "insert into table_a select long_column from table_b where id=123"

      I guess external file access is my only option now. Thanks anyway!

      - Will

      Comment

      • Frank

        #4
        Re: Oracle 8.0 Copy long from 1 table to another

        jcwhui wrote:
        Dale Edgar <Dale@DataBee.c omwrote in
        news:tctknvg1ah vp1ga310pd1fhn1 qsd90avip@4ax.c om:
        >
        >
        >>On Tue, 30 Sep 2003 20:55:26 GMT, jcwhui
        >><j_c_w_h_u_i@ hot_mail.compan ywrote:
        >>
        >>
        >>>My problem is I need to copy the value of the long column in table A to
        >>>another table B's long column.
        >>>
        >>>Unfortunatel y, "insert into table_a select long_column from table_b"
        >>>doesn't work. I also thought of changing table_a's long column to clob,
        >>>and convert table_b.long_co lumn to clob before inserting into table_a,
        >>>but to_lob() doesn't exist in Oracle 8.0.
        >>>
        >>>So is this my only option: dumping table_b.long_co lumn to a file and
        >>>loading it back to table_a.long_co lumn?
        >>
        >>Investigate the use of the SQLPlus COPY command. This can transfer
        >>longs.
        >>
        >>Here's a link to the FAQ: http://www.orafaq.com/faqplus.htm#COPYLONG
        >>
        >>Kind regards
        >>Dale
        >
        >
        >
        I doubt this will work for me. My code is inside a stored procedure. And
        in fact I meant to copy 1 particular row from table_b to table_a, i.e.
        "insert into table_a select long_column from table_b where id=123"
        >
        I guess external file access is my only option now. Thanks anyway!
        >
        - Will
        Insert all data, except the long, then update the long.
        Didn't try, but works for LOB across dblinks...

        --
        Regards, Frank van Bortel

        Comment

        Working...