Results 1 to 5 of 5

Thread: Beginner Oracle

  1. #1
    Join Date
    Aug 2002
    Posts
    1

    Smile Unanswered: Beginner Oracle

    :confused: I am a student taking my first oracle class when trying to insert into a table I created I get
    ORA-00928: missing SELECT keyword
    when I look up the error it says I need to create view I don't understand I just want to add data to a table. A Lot different from Access huh? Help please

  2. #2
    Join Date
    Aug 2002
    Posts
    2
    Can you post your INSERT statement?

  3. #3
    Join Date
    Dec 2001
    Posts
    5
    Please refer to the statement shows below.

    INSERT INTO films VALUES
    ('UA502','Bananas',105,'1971-07-13','Comedy');

  4. #4
    Join Date
    Aug 2002
    Location
    IL
    Posts
    73
    Originally posted by xiaobin
    Please refer to the statement shows below.

    INSERT INTO films VALUES
    ('UA502','Bananas',105,'1971-07-13','Comedy');
    The reason is that you have to state the column names in the following way:
    INSERT INTO films(column1, column2, column3, column4, column5) VALUES
    ('UA502','Bananas',105,'1971-07-13','Comedy');

    using insert statement in the way you've used it is allowed only if you are stating a value for all columns in the table.

  5. #5
    Join Date
    Aug 2002
    Posts
    2
    Originally posted by xiaobin
    Please refer to the statement shows below.

    INSERT INTO films VALUES
    ('UA502','Bananas',105,'1971-07-13','Comedy');
    Assuming that the films table only has 5 columns and that the data you've entered is in the correct order, then I would suspect the date as being the problem. Try setting the date explicitly instead of implicitly. Ex:

    INSERT INTO films VALUES
    ('UA502','Bananas',105,to_date('1971-07-13','YYYY-MM-DD'),'Comedy');

Posting Permissions

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