Results 1 to 5 of 5

Thread: Bug???

  1. #1
    Join Date
    Feb 2004
    Posts
    86

    Unanswered: Bug???

    Is this a bug in Oracle 8.1.7???

    begin
    insert into mytable (columns,test)
    values (10,'test');
    end;

    ORA-06550: line 2, column 19: PLS-00103: Encountered the symbol "COLUMNS" when expecting one of the following: ( select <an identifier> <a double-quoted delimited-identifier> The symbol "<an identifier> was inserted before "COLUMNS" to continue.

    However, when I remove the begin and end statement the insert works successfully. Is this a bug or am I missing something obvious here?

  2. #2
    Join Date
    Aug 2003
    Location
    Guwahati, India
    Posts
    33

    Put a Commit before the End

    Hi,

    Are you trying to run as Stored procedure ? If so, insert a commit at the end of sql statement just before end.

    The procedure will be like

    create of replace procedure xyz is

    -- Declare the variables

    Begin
    insert into mytable values ( Column1,Column2 ) ;
    commit;
    End xyz ;


    Try like this and do reply .






    I tried once like this . It worked.
    G J Shankar Nath
    IT Consultant, Vedswasti Services Pvt. Ltd
    Guwahati-781007
    India

  3. #3
    Join Date
    Feb 2004
    Posts
    86
    No, there is no stored procedure. I'm using a statement that has an update query as part of the statement, but have narrowed it down to the field called columns. This can't be placed in a procedure.

  4. #4
    Join Date
    Feb 2004
    Posts
    86
    Resolved, I changed columns with "COLUMNS"

  5. #5
    Join Date
    Sep 2004
    Location
    London, UK
    Posts
    565
    There are reserved words that interfere with the syntax if you try to use them as table or column names etc. Looks like you hit one of them.

    As a rule it is better NOT to commit within stored procedures as this gives them side-effects and limits their usefulness.

Posting Permissions

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