Results 1 to 8 of 8

Thread: sql+ issues

  1. #1
    Join Date
    Sep 2013
    Posts
    14

    Unanswered: sql+ issues

    SQL> create table accountmanager
    2 ( amid char(4),
    3 amfirst varchar(12),
    4 amlast varchar(12),
    5 amdate DATE DEFAULT SYSDATE,
    6 amsal NUMBERS(8,2),
    7 amcomm NUMBERS(7,2) DEFUALT 0,
    8 amern AS (amsal + amcomm),
    9 region char(2) );
    amsal NUMBERS(8,2),
    *
    ERROR at line 6:
    ORA-00907: missing right parenthesis
    what am i doing wrong

  2. #2
    Join Date
    Sep 2013
    Posts
    14

    Question sql+ 11 g

    SQL> create table accountmanager
    2 ( amid char(4),
    3 amfirst varchar(12),
    4 amlast varchar(12),
    5 amdate DATE DEFAULT SYSDATE,
    6 amsal NUMBER(8,2),
    7 amcom NUMBER(7,2) Defualt 0,
    8 amearn AS (amsal + amcomm),
    9 region CHAR9(2) );
    amcom NUMBER(7,2) Defualt 0,
    *
    ERROR at line 7:
    ORA-00907: missing right parenthesis
    i have made some changes but i keep getting erroes

  3. #3
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    I don't think MySQL supports calculated columns in table definitions.
    Last edited by gvee; 09-11-13 at 08:57.
    George
    Home | Blog

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    this is Oracle DDL I guess from the error message: ORA-00907
    do you wan the question moving to the Oracle forum?
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Sep 2013
    Posts
    14
    that is fine

  6. #6
    Join Date
    Sep 2013
    Posts
    14

    creae table

    SQL> create table accountmanager
    2 ( amid char(4),
    3 amfirst varchar(12),
    4 amlast varchar(12),
    5 amdate DATE DEFAULT SYSDATE,
    6 amsal NUMBER(8,2),
    7 amcom NUMBER(7,2) Defualt 0,
    8 amearn AS (amsal + amcomm),
    9 region CHAR9(2) );
    amcom NUMBER(7,2) Defualt 0,
    *
    ERROR at line 7:
    ORA-00907: missing right parenthesis
    what is missing

  7. #7
    Join Date
    Dec 2007
    Posts
    253
    You've miss spelled the word default

  8. #8
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    threads merged
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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