Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Posts
    51

    Unanswered: What's the err in this

    1 create or replace procedure a as
    2 str varchar2(300);
    3 begin
    4 str:='select month'||&num||' from trial;';
    5 dbms_output.put_line(str);
    6 execute immediate str;
    7* end;

    SQL> /
    Enter value for num: 2
    old 4: str:='select month'||&num||' from trial;';
    new 4: str:='select month'||2||' from trial;';

    Procedure created.

    SQL> exec a
    select month2 from trial;
    BEGIN a; END;

    *
    ERROR at line 1:
    ORA-00911: invalid character
    ORA-06512: at "ARPEUL.A", line 6
    ORA-06512: at line 1
    sampath gowri

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    semicolon.

Posting Permissions

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