wood burning stoves 2.0*
The moose likes JDBC and the fly likes SQL insert query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "SQL insert query" Watch "SQL insert query" New topic
Author

SQL insert query

shuzo monsoon
Ranch Hand

Joined: Feb 11, 2004
Posts: 54
Hello people! I'm experiencing difficulty in executing an INSERT query from a JSP page. The problem is with the WHERE part of the clause (because it works when I've taken it out) , I've tried two different versions - here they are:

Second variation

What I should say is that the table into which I am inserting already has some values in different fields and basically the rest of the fields in that row need to be filled.
Can anyone help? Thank you!
[ March 18, 2004: Message edited by: shuzo monsoon ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60807
    
  65

Moving to the JDBC Forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
eammon bannon
Ranch Hand

Joined: Mar 16, 2004
Posts: 140
Looks like you are confusing sql INSERT syntax with SQL UPDATE syntax. Your first update will probably work if you write it like this:

[ March 18, 2004: Message edited by: eammon bannon ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SQL insert query
 
Similar Threads
JSP SQL String: Too long?
How to handle comma in the text field?
SQL error
Exception in Bean Service
insert null date into DB2 using preparestatement