| | |
How to insert data in one column in database?
Please support our ColdFusion advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Sep 2006
Posts: 5
Reputation:
Solved Threads: 0
Hi 2 all experts out there....
Im begging all of you to help me in my problem... Please... please... please....
my problem goes like this:
if i have students having a grades of:
First Grading
James Tan 88
Jaime Abba 85
Grace Sasa 78
Gerald Hulife 96
Mark Reyes 85
then submit it... and retrieve for adding again the:
Second Grading
James Tan 88 78
Jaime Abba 85 90
Grace Sasa 78 85
Gerald Hul 96 85
Mark Reyes 85 90
then submit again... and retrieve for adding again the 3rd and 4th grading:
How will I insert that in one column but different fields in a database?
Like this:
tbl_studentgrade
Name 1st 2nd 3rd 4th Ave
James Tan 88 78
Jaime Abba 85 90
Grace Sasa 78 85
Gerald Hul 96 85
Mark Reyes 85 90
If anyone knows how, Please help me....
Tnx...
Reyn
Im begging all of you to help me in my problem... Please... please... please....
my problem goes like this:
if i have students having a grades of:
First Grading
James Tan 88
Jaime Abba 85
Grace Sasa 78
Gerald Hulife 96
Mark Reyes 85
then submit it... and retrieve for adding again the:
Second Grading
James Tan 88 78
Jaime Abba 85 90
Grace Sasa 78 85
Gerald Hul 96 85
Mark Reyes 85 90
then submit again... and retrieve for adding again the 3rd and 4th grading:
How will I insert that in one column but different fields in a database?
Like this:
tbl_studentgrade
Name 1st 2nd 3rd 4th Ave
James Tan 88 78
Jaime Abba 85 90
Grace Sasa 78 85
Gerald Hul 96 85
Mark Reyes 85 90
If anyone knows how, Please help me....
Tnx...
Reyn
"IT student doesn't work HARD but work SMART"
•
•
Join Date: Jan 2007
Posts: 30
Reputation:
Solved Threads: 0
Hello,
If I understand you correctly, you are trying to store multiple grades in one text/varchar column.
To do this, the first grade would be put into the database using an INSERT statement with each consecutive grade getting inserted by an UPDATE statement because we are updating an existing record. Try doing something such as:
Note that the new grade is padded with a leading space.
A more sophisticated approach might be to separate the student, grade, and assignment into separate tables.
Good luck,
Dan
If I understand you correctly, you are trying to store multiple grades in one text/varchar column.
To do this, the first grade would be put into the database using an INSERT statement with each consecutive grade getting inserted by an UPDATE statement because we are updating an existing record. Try doing something such as:
UPDATE tbl_studentgrade SET
grade = grade || ' 78'
WHERE student = 'Some Student ID'Note that the new grade is padded with a leading space.
A more sophisticated approach might be to separate the student, grade, and assignment into separate tables.
Good luck,
Dan
![]() |
Similar Threads
- How to insert data into database? (JSP)
- insert data from one form into two diffent database table (JSP)
- how to insert data from dataset into database (VB.NET)
- How to insert data into a db (Java)
- conversion of text file into data base file (Visual Basic 4 / 5 / 6)
- Insert Data in to Db from the Dynamic Rows (HTML and CSS)
- Unable to insert data into database. (MySQL)
Other Threads in the ColdFusion Forum
- Previous Thread: ADOBUG
- Next Thread: help! need to accumulate total
| Thread Tools | Search this Thread |





