URGENT HELP - Export from A and import into B
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: URGENT HELP - Export from A and import into B

  1. #1
    Join Date
    Apr 2001
    Posts
    45
    Can I export table A and import it into table B in the same or another schema ?

    This is because table A has a long col and I can't used insert into select from option.

    Baiscally I need to append the contents of A with B (i.e B = B+A or C=B+A)

    Any other suggestions welcome.


    May$e

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    you can try copy command in sql*plus, it allows append data and I believe accept long as well and itīs fast, very very fast


    COPY
    Purpose
    Copies the data from a query to a table in a local or remote database. COPY supports the following datatypes:

    CHAR
    DATE
    LONG
    NUMBER
    VARCHAR2
    Syntax
    COPY {FROM database | TO database | FROM database TO database}
    {APPEND|CREATE|INSERT|REPLACE} destination_table
    [(column, column, column, ...)] USING query
    where database has the following syntax:

    username[/password]@connect_identifier

  3. #3
    Join Date
    Apr 2001
    Posts
    45
    Thanks PANDO for the prompt response.

    I'll try that and let you know how it works out



  4. #4
    Join Date
    Apr 2001
    Posts
    45
    Pando:

    Do I have to "set long 32767" or a higher value for this to work ?

    And can I rollback ?

    Thanks

  5. #5
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    you cant rollback, I dont know the max size of long so you better check the documentation for that sorry

  6. #6
    Join Date
    Apr 2001
    Posts
    45
    Pando:

    Here is what the docs say:

    LONG values are limited to the length set by the SET LONG command. Any LONG data that is longer than the SET LONG value are truncated.

    Commits are perfromed at the end of each successful COPY.
    ... use the SET commands COPYCOMMIT and ARRAYSIZE.

    The SET COPYCOMMIT establishes a set number of record batches that are processed between commits.

    The SET ARRAYSIZE parameter setting establishes the number of records per batch that are processed.

    Thanks for bringing this copy command to my attention. With the correct values of "set long" and "set copycommit" and "set arraysize" I was able to copy the data.


    May$e


    [Edited by mayse on 12-19-2001 at 02:31 PM]

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