error in procedure
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: error in procedure

  1. #1
    Join Date
    Dec 2002
    Location
    Chennai, India
    Posts
    104

    error in procedure

    Hi Guys,

    I have a procedure(see attached) which gives an error at the point where i mentioned sqlplus copy command. Somebody help pls.
    Error is
    *********
    ERROR at line 4:
    ORA-06550: line 4, column 7:
    PLS-00103: Encountered the symbol "FROM" when expecting one of the following:
    := . ( @ % ;'

    My procedure is
    **************
    --
    -- defines
    --
    define CONDITION = &1
    --
    -- display parameters
    --
    prompt CONDITION = "&CONDITION"

    set arraysize 5000

    DECLARE
    BEGIN
    IF (&CONDITION = 0) THEN
    copy from acc/acc@acc to acc/acc@acc INSERT tcall_today using select * from call_today;
    delete from call_today where term_date=&CONDITION;
    ELSE
    copy from acc/acc@acc to acc/acc@acc INSERT tcall_today using select * from call_today where term_date=&CONDITION;
    delete from call_today;
    END IF;
    commit;
    END;
    /
    exit
    /

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,095
    COPY is a sqlplus command, not a PL/SQL command.
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

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