Results 1 to 6 of 6

Thread: How to avoid "SQL Error 109"?

  1. #1
    Join Date
    Dec 2009
    Posts
    68

    How to avoid "SQL Error 109"?

    Hello friend,

    I am getting troubled while solving one error which occurs when trying to run the below mentioned query:
    INSERT
    temp ( ID,Name, Location, Qualification, Age)
    VALUES
    (03,'sam', 'Mumbai', BCom)
    When I try to run this query I get 'Error 109' and the execution get terminated. I am unable to find the cause of this error. I wonder if you are able make some help in this SQL error.

  2. #2
    Join Date
    May 2008
    Posts
    2,389

    Re: How to avoid "SQL Error 109"?

    "SQL Error 109" occurs only when more columns are listed within the "Insert" statement of SQL than values which are mentioned in the VALUES clause. I suggest you to don't assume "Error 109" error as a operating-system error 109. You should make sure that the number of values from the "values"clause must match with the number of columns of the table which is written in the "Insert" SQL statement.

  3. #3
    Join Date
    Feb 2008
    Posts
    1,852

    Re: How to avoid "SQL Error 109"?

    Hi friend,

    I seems that the number of values from Value clause and Number of column doesn't match. That is you have passed the five number of column while you have pass the values for only four column. To should make this correction in your query to avoid "Error 109". The number of column and values must be identical. See below example:
    INSERT
    t1 (col1,col2,col3)
    VALUES (val1,val2,val3)

  4. #4
    Join Date
    Jan 2008
    Posts
    1,521

    Re: How to avoid "SQL Error 109"?

    Hello

    I suggest you to try following query instead of your query. You query sounds faulty. Use following query and let me know if you are still getting "Error 109" or not. Hopefully it will run successfully:
    insert
    temp (ID,Name, Location, Qualification, Age)
    values
    (04,'Lana', 'Landon', 'Bcom', 25)

  5. #5
    Join Date
    Apr 2008
    Posts
    1,948

    Re: How to avoid "SQL Error 109"?

    You need to check the SQL query statement syntax near the syntax element which mentioned within the error message. The you also need to check the entire SQL query statement which cause this error. It may happen because the the syntax of the sql query sometimes may be quit complex. The order of the SQL statement is also important. Id the the order of statements is not proper then it also generates a error.

  6. #6
    Join Date
    Dec 2009
    Posts
    68

    Re: How to avoid "SQL Error 109"?

    Hello friend,

    Thanks for all your help over this "SQL Error 109". Yes you was correct the problem was in the number of column and values. When I checked my query statement I found that the value for one column is missing. Then I re-execute the same query withe additional value for missing column. And hopefully I executed without any error. Now I don't get any error while running the mentioned query of insert.

Similar Threads

  1. Replies: 3
    Last Post: 10-01-2014, 10:40 AM
  2. Replies: 5
    Last Post: 19-04-2011, 08:54 AM
  3. Replies: 4
    Last Post: 12-02-2011, 07:10 AM
  4. Replies: 3
    Last Post: 30-07-2009, 08:40 PM
  5. Replies: 1
    Last Post: 11-08-2008, 03:22 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,979,984.50654 seconds with 17 queries