DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: SQL Question

  1. #1
    Join Date
    Dec 1999
    Posts
    217

    SQL Question

    Hi Guys,

    Can you tell me what is wrong with this SQL statement?

    copy from scott/tiger@dev01 to user1/temp@prod1 replace casting using SELECT * FROM casting;

    Chintz

  2. #2
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166

    Re: SQL Question

    Originally posted by Chintz
    Hi Guys,

    Can you tell me what is wrong with this SQL statement?

    copy from scott/tiger@dev01 to user1/temp@prod1 replace casting using SELECT * FROM casting;

    Chintz
    As I have never used the command I had to look it up.

    COPY
    The COPY command is not being enhanced to handle datatypes or features introduced with, or after Oracle8. The COPY command is likely to be made obsolete in a future release. For COPY command details and syntax, see Appendix B, "SQL*Plus COPY Command".

  3. #3
    Join Date
    Dec 1999
    Posts
    217
    The syntax is not erroring out on the copy command. I am getting the following error:

    Array fetch/bind size is 15. (arraysize is 15)
    Will commit when done. (copycommit is 0)
    Maximum long size is 80. (long is 80)

    ERROR:
    ORA-00955: name is already used by an existing object


    Chintz

  4. #4
    Join Date
    Jul 2002
    Location
    Northampton, England
    Posts
    612
    Maybe, just maybe there is already a table in your target schema called Casting... and i'm guessing that replace doesn't work as you think it ought to... (like in a create or replace view)...

  5. #5
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    it shud replace the contents by drop and recreate..

    REPLACE

    Replaces destination_table and its contents with the rows from query. If destination_table does not exist, COPY creates it. Otherwise, COPY drops the existing table and replaces it with a table containing the copied data.
    Can you post result of below query

    Select Object_Name, Object_Type From All_Objects Where Owner = 'USER1' And Object_Name = 'CASTING';

    Abhay.
    funky...

    "I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

    "Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

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