sql error db21034e


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: sql error db21034e

Hybrid View

  1. #1
    Join Date
    Sep 2013
    Posts
    1

    Question sql error db21034e

    this is the table that i've created..

    CREATE TABLE CGPA
    (
    CGPA_ID VARCHAR(10) NOT NULL PRIMARY KEY,
    STUD_CGPA DECIMAL(2,2) NOT NULL,
    STUD_ID VARCHAR(10) NOT NULL,
    SEM_ID INTEGER NOT NULL,
    FOREIGN KEY(STUD_ID) REFERENCES STUDENT(STUD_ID),
    FOREIGN KEY(SEM_ID) REFERENCES SEMESTER(SEM_ID)
    );

    successfully returned..but when i want to insert the data using statement below, sql error db21034e occured..what is wrong with my sql statement?

    INSERT INTO CGPA (CGPA_ID, STUD_CGPA, STUD_ID, SEM_ID)
    VALUES('CGPA101', '03.58', '2011341903', '004');

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    You are trying to insert a string into a decmial field. Remove the single quote marks from data that is not a string.
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

Similar Threads

  1. Replies: 0
    Last Post: 06-26-2012, 03:44 AM
  2. Replies: 2
    Last Post: 04-19-2009, 05:01 AM
  3. Replies: 9
    Last Post: 02-25-2009, 09:11 PM
  4. Replies: 12
    Last Post: 10-24-2008, 02:15 PM
  5. Replies: 0
    Last Post: 02-22-2002, 03:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center