INSERT statement
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: INSERT statement

Hybrid View

  1. #1
    Join Date
    May 2013
    Posts
    1

    INSERT statement

    I'm trying to insert a values in a table, that has 3 columns. But I'm getting "ora-00984 : column not allowed here" - error. I've taken a value in w_total = 20865000 and executing
    insert into temp_latepos values ('USD',w_total,0) in VB 6.0. Please help me resolve this issue.
    w_total is the figure got by various calculations and cannot be the same every time. USD is always constant and 0 is also constant.

  2. #2
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,459
    Quote Originally Posted by K PRASANNA View Post
    I'm trying to insert a values in a table, that has 3 columns. But I'm getting "ora-00984 : column not allowed here" - error. I've taken a value in w_total = 20865000 and executing
    insert into temp_latepos values ('USD',w_total,0) in VB 6.0. Please help me resolve this issue.
    w_total is the figure got by various calculations and cannot be the same every time. USD is always constant and 0 is also constant.
    ORA-00984 column not allowed here

    Cause: A column name was used in an expression where it is not permitted, such as in the VALUES clause of an INSERT statement.

    Action: Check the syntax of the statement and use column names only where appropriate.

    Typically ORA-00984 occurs while including a column name in the VALUES clause of an INSERT statement. To correct, you simply need to review the syntax of the SQL statement and only use column names where they are appropriate.
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  3. #3
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    Quote Originally Posted by K PRASANNA View Post
    I'm getting "ora-00984 : column not allowed here" - error.

    insert into temp_latepos values ('USD',w_total,0)
    ... and Oracle is right, what is w_total doing there?
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

Posting Permissions

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



Click Here to Expand Forum to Full Width