Jump to content


Photo

Help Please. For Our Case Study


  • Please log in to reply
2 replies to this topic

#1 Buls

Buls

    New Member

  • Members
  • Pip
  • 2 posts

Posted 06 September 2012 - 01:31 AM

I'm trying to insert values into my table, but it doesn't seem to work anymore I get an error message stating;

"ERROR 1136 (21S01): Column count doesn't match value count at row 1"

here's my tables:

CREATE TABLE records (
Lastname CHAR(50),
Name CHAR(50),
DByr CHAR(50),
DBmonth CHAR(50),
DBday CHAR(50),
Sex CHAR(10),
Birthplace CHAR(100),
ParentOrGuardian CHAR(50),
PGaddress CHAR(100),
PGoccupation CHAR(50),
Elementary CHAR(50),
YearofElem CHAR(5),
PresentSchool CHAR(50),
Year CHAR(50),
Section CHAR(50),
English CHAR(3),
Mathematics CHAR(3),
Science CHAR(3),
Filipino CHAR(3),
AralingPanlipunan CHAR(3),
PhysicalEducation CHAR(3),
June CHAR(3),
July CHAR(3),
August CHAR(3),
September CHAR(3),
October CHAR(3),
November CHAR(3),
December CHAR(3),
January CHAR(3),
February CHAR(3),
March CHAR(3),
AveOfElem DECIMAL(5,2)
);

INSERT INTO records (
Lastname,
Name,
DByr,
DBmonth,
DBday,
Sex,
Birthplace,
ParentOrGuardian,
PGaddress,
PGoccupation,
Elementary,
YearofElem,
PresentSchool,
Year,
Section,
English,
Mathematics,
Science,
Filipino,
AralingPanlipunan,
PhysicalEducation,
June,
July,
August,
September,
October,
November,
December,
January,
February,
March,
AveOfElem )
VALUES (
'Abrenica',
'Aljur',
'1998',
'February',
'10',
'Male',
'CSFP',
'Jerome Bulaon',
'Bulaon CSFP',
'Model',
'SanFernando Elementary School',
'2011'
'Sindalan HighSchool',
'1st Year',
'N-202',
'88',
'88',
'89',
'88',
'88',
'88',
'15',
'21',
'21',
'20',
'22',
'18',
'14',
'20',
'21',
'22',
88.5
);

#2 heybales

heybales

    New Member

  • Members
  • Pip
  • 4 posts

Posted 06 September 2012 - 05:30 PM

There is a comma missing in the values section. '2011' should be '2011',

I'm trying to insert values into my table, but it doesn't seem to work anymore I get an error message stating;

"ERROR 1136 (21S01): Column count doesn't match value count at row 1"

here's my tables:

CREATE TABLE records (
Lastname CHAR(50),
Name CHAR(50),
DByr CHAR(50),
DBmonth CHAR(50),
DBday CHAR(50),
Sex CHAR(10),
Birthplace CHAR(100),
ParentOrGuardian CHAR(50),
PGaddress CHAR(100),
PGoccupation CHAR(50),
Elementary CHAR(50),
YearofElem CHAR(5),
PresentSchool CHAR(50),
Year CHAR(50),
Section CHAR(50),
English CHAR(3),
Mathematics CHAR(3),
Science CHAR(3),
Filipino CHAR(3),
AralingPanlipunan CHAR(3),
PhysicalEducation CHAR(3),
June CHAR(3),
July CHAR(3),
August CHAR(3),
September CHAR(3),
October CHAR(3),
November CHAR(3),
December CHAR(3),
January CHAR(3),
February CHAR(3),
March CHAR(3),
AveOfElem DECIMAL(5,2)
);

INSERT INTO records (
Lastname,
Name,
DByr,
DBmonth,
DBday,
Sex,
Birthplace,
ParentOrGuardian,
PGaddress,
PGoccupation,
Elementary,
YearofElem,
PresentSchool,
Year,
Section,
English,
Mathematics,
Science,
Filipino,
AralingPanlipunan,
PhysicalEducation,
June,
July,
August,
September,
October,
November,
December,
January,
February,
March,
AveOfElem )
VALUES (
'Abrenica',
'Aljur',
'1998',
'February',
'10',
'Male',
'CSFP',
'Jerome Bulaon',
'Bulaon CSFP',
'Model',
'SanFernando Elementary School',
'2011'
'Sindalan HighSchool',
'1st Year',
'N-202',
'88',
'88',
'89',
'88',
'88',
'88',
'15',
'21',
'21',
'20',
'22',
'18',
'14',
'20',
'21',
'22',
88.5
);



#3 Buls

Buls

    New Member

  • Members
  • Pip
  • 2 posts

Posted 06 September 2012 - 08:55 PM

fixed already. thanks though




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users