1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

ora-00906 MISSING LEFT PARENTHESIS

Discussion in 'General' started by monkey, Apr 22, 2014.

  1. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
    Hello!
    I have a code like this:

    Code (Text):
    &&mdrp.sql
    &&mtab.sql
    &&mins.sql
    ***

    then:
    Code (Text):

    drop table m cascade constraints
    ***

    Code (Text):

    create table m(
    idm integer not null,
    mname varchar2(10) not null,
    nsurname varchar2(10) not null
    );
    ***

    Code (Text):
    insert into m values(1,'aa','AAA',);
    insert into m values(2,'bb', 'BBB');
    insert into m values(3, 'cc', 'CCC');
     
    ***

    Code (Text):
    create trigger t1 after update of msurname on m for each row when (old.idm=1)
    begin
    update m
    set mname=trigger1
    where idm=1;
    end;

    create trigger t2 after update of msurname on m for each row when (old.idm=2)
    begin
    update m
    set mname=trigger2
    where idm=1;
    end;

    create trigger t3 after update of msurname on m for each row when (old.idm=3)
    begin
    update m
    set mname=trigger3
    where idm=1;
    end;

    update m
    set msurname="UPDATED'
    where idm=1;

    select * from m;


     
    Please, how to correct it?
    p.s. first 4 files show no errors when run...
    MANY THANKS!!!
     
  2. ocprep

    ocprep Forum Advisor

    Messages:
    277
    Likes Received:
    76
    Trophy Points:
    410
    Location:
    Orlando, Florida
    Fourth code block -- you have an extra comma after 'AAA' that would cause an error.
     
  3. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
    Hello!
    Many thanks!
    Would the trigger work otherwise? I appologise to ask:_ i have problems with my pc so I can't chack at moment!
    MANY THANKS PEOPLE!!!
     
  4. ocprep

    ocprep Forum Advisor

    Messages:
    277
    Likes Received:
    76
    Trophy Points:
    410
    Location:
    Orlando, Florida
    I have no idea. I didn't run the code, I scanned through the lines and that error was obvious. You seem to have the mistaken impression that the people on this forum have nothing better to do than correct your code and answer questions for that you could answer yourself by spending a few minutes reading the manual.
     
  5. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
    Can someone reccomand a good manual for beginners? I find on net complicated structures, so that I cannot figure out what is the basic rule?

    Many thanks!
     
  6. krasnoslobodtsev_si

    krasnoslobodtsev_si Forum Genius

    Messages:
    626
    Likes Received:
    129
    Trophy Points:
    810
    Location:
    Russian Federation
  7. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
    Many many thanks, but still searching for some details, more complicated...(at least for me at that moment)