missing right parenthesis

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bazubwabo
    New Member
    • Nov 2006
    • 14

    missing right parenthesis

    hi everybody,
    by creating my employee table ,i've gotten a missing right parenthesis error but i don't know why.Could please help me to find out the error.

    SQL> CREATE TABLE EMPLOYEE
    2 (emplNo INT PRIMARY KEY,
    3 emplName VARCHAR(20) NOT NULL,
    4 emplStartDate DATE TIME,
    5 emplStatus VARCHAR(20),
    6 dprtNo INT);
    emplStartDate DATE TIME,
    *
    ERROR at line 4:
    ORA-00907: missing right parenthesis
  • milonov
    New Member
    • Oct 2006
    • 32

    #2
    hi

    error is here: emplStartDate DATE TIME
    ^^^^^^^^^^^^
    no such type, change to emplStartDate DATE and you'll feel happiness :)

    Best Regards,
    Michael Milonov


    Originally posted by bazubwabo
    hi everybody,
    by creating my employee table ,i've gotten a missing right parenthesis error but i don't know why.Could please help me to find out the error.

    SQL> CREATE TABLE EMPLOYEE
    2 (emplNo INT PRIMARY KEY,
    3 emplName VARCHAR(20) NOT NULL,
    4 emplStartDate DATE TIME,
    5 emplStatus VARCHAR(20),
    6 dprtNo INT);
    emplStartDate DATE TIME,
    *
    ERROR at line 4:
    ORA-00907: missing right parenthesis

    Comment

    • bazubwabo
      New Member
      • Nov 2006
      • 14

      #3
      hi guys,
      Could u please to help me again by correcting the error,eventuall y i didn't get how to correct the error.
      Thanks

      Comment

      • milonov
        New Member
        • Oct 2006
        • 32

        #4
        CREATE TABLE EMPLOYEE
        (emplNo INT PRIMARY KEY,
        emplName VARCHAR(20) NOT NULL,
        emplStartDate DATE,
        emplStatus VARCHAR(20),
        dprtNo INT);

        that's all.

        Originally posted by bazubwabo
        hi guys,
        Could u please to help me again by correcting the error,eventuall y i didn't get how to correct the error.
        Thanks

        Comment

        • bazubwabo
          New Member
          • Nov 2006
          • 14

          #5
          hi guys ,
          thanks a lot i've found out the error .

          regards,
          bazubwabo Jean Bertrand
          IT student at Fontys University

          Comment

          • bazubwabo
            New Member
            • Nov 2006
            • 14

            #6
            hi,
            i've tried also to insert values on employee table but however i've found some erros,if by the way you have something for me you can help me to correct them.

            1)SQL> INSERT INTO EMPLOYEE VALUES (123,'RENE','20 03/09/01',' ',7);
            INSERT INTO EMPLOYEE VALUES (123,'RENE','20 03/09/01',' ',7)
            *
            ERROR at line 1:
            ORA-01861: literal does not match format string

            2)SQL> INSERT INTO EMPLOYEE VALUES (110,'MTENTHIJE ',' ',' ',21);
            INSERT INTO EMPLOYEE VALUES (110,'MTENTHIJE ',' ',' ',21)
            *
            ERROR at line 1:
            ORA-01847: day of month must be between 1 and last day of month

            3)SQL> INSERT INTO EMPLOYEE VALUES (153,'RECTEMP05 ','01-SEPT-2003',' ',7);
            INSERT INTO EMPLOYEE VALUES (153,'RECTEMP05 ','01-SEPT-2003',' ',7)
            *
            ERROR at line 1:
            ORA-01841: (full) year must be between -4713 and +9999, and not be 0

            Thanks for your attention

            Comment

            • milonov
              New Member
              • Oct 2006
              • 32

              #7
              1) INSERT INTO EMPLOYEE VALUES (123,'RENE', to_date('2003/09/01', 'yyyy/mm/dd'), NULL ,7);

              2) INSERT INTO EMPLOYEE (emplNo, emplName, dprtNo) VALUES (110,'MTENTHIJE ', 21);

              3) INSERT INTO EMPLOYEE VALUES (153,'RECTEMP05 ', to_date('01-SEP-2003', 'dd-mon-yyyy'), NULL,7);

              Best Regards,
              Michael Milonov
              http://www.snotratech. com

              Originally posted by bazubwabo
              hi,
              i've tried also to insert values on employee table but however i've found some erros,if by the way you have something for me you can help me to correct them.

              1)SQL> INSERT INTO EMPLOYEE VALUES (123,'RENE','20 03/09/01',' ',7);
              INSERT INTO EMPLOYEE VALUES (123,'RENE','20 03/09/01', ' ',7)
              *
              ERROR at line 1:
              ORA-01861: literal does not match format string

              2)SQL> INSERT INTO EMPLOYEE VALUES (110,'MTENTHIJE ',' ',' ',21);
              INSERT INTO EMPLOYEE VALUES (110,'MTENTHIJE ',' ',' ',21)
              *
              ERROR at line 1:
              ORA-01847: day of month must be between 1 and last day of month

              3)SQL> INSERT INTO EMPLOYEE VALUES (153,'RECTEMP05 ','01-SEPT-2003',' ',7);
              INSERT INTO EMPLOYEE VALUES (153,'RECTEMP05 ','01-SEPT-2003',' ',7)
              *
              ERROR at line 1:
              ORA-01841: (full) year must be between -4713 and +9999, and not be 0

              Thanks for your attention

              Comment

              • bazubwabo
                New Member
                • Nov 2006
                • 14

                #8
                Thanks a lot for your help .
                Regards ,
                bertrand

                Comment

                Working...