Please Help me(SQL)

I have a table named MEAL which contains a foreign key STU_NUM from

STUDENT table so i want to insert two values into MEAL table using the criteria of STU_NUM.

I have tried this code but it gives me Exception which says:

Failed to insertjava.sql.SQLException[Microsoft]

[ODBC Microsoft Access Driver]Missing semicolon(;)at the end of SQL

statement

String query = "INSERT INTO MEAL(MEAL_REL_MADE,MEAL_AMT_LOADED)VALUE("+

"'" + jtfAmLd.getText().trim() +"'" + "," +

"'" + jtfRM.getText().trim()+ "'" + ") WHERE MEAL.STU_NUM ='" +jtfStNo.getText().trim() + "'";

I'll glad if someone can help me with this kind of error

[685 byte] By [Klaas2001a] at [2007-9-29 9:45:53]
# 1
String query = "INSERT INTO MEAL(MEAL_REL_MADE,MEAL_AMT_LOADED)VALUES("+"'" + jtfAmLd.getText().trim() +"'" + "," +"'" + jtfRM.getText().trim()+ "'" + ") WHERE MEAL.STU_NUM ='" + jtfStNo.getText().trim() + "';";
dhinojosaa at 2007-7-14 23:16:49 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
Try using PreparedStatement by the way, make life super easy.
dhinojosaa at 2007-7-14 23:16:49 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 3
The INSERT statement doesn't accept a WHERE clause. Get rid of it. If you want to insert a row into a table, you just insert it. "Where" doesn't make any sense.
DrClapa at 2007-7-14 23:16:49 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 4
DrClap I think this is the second time you have replied to this question with the same answer.rykk
rykk.a at 2007-7-14 23:16:49 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 5
But DrClap is right!-Sanjay
sanjaya_ganesha at 2007-7-14 23:16:49 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 6

> DrClap

> I think this is the second time you have replied to

> this question with the same answer.

> rykk

Really? I don't remember doing that. The other question must have been a cross-post, then, because I only have one answer in this thread. And I must have thought it was a good answer.

DrClapa at 2007-7-14 23:16:49 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 7
Also, in general be careful of cramming all your letters together and give spaces where spaces are due.JK
talljamesa at 2007-7-14 23:16:49 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 8
I thought it was a great answer as well.rykk
rykk.a at 2007-7-14 23:16:49 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...