This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQL syntax error

 
Donna Harrington
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey all,
I have a syntax error and i want to update both tables customerdetails table and order table. but my join is wrong or something. can anybody see my error. thank u!

PreparedStatement p = con.prepareStatement("INSERT INTO customerdetails JOIN order(Title,Username,Password,FirstName,Surname,Address,City,Email,TelephoneNum,cardType,cardNum,date,month,year,shipTitle,shipSurname,shipAddress,shipCity,shipCountry,shipPostalCode)"+" VALUES('"+radio+"','"+Username+"','"+Password+"','"+FirstName+"','"+Surname+"','"+Address+"','"+City+"','"+Email+"','"+telephoneNum+"','"+radio1+"','"+cardNum+"','"+date+"','"+month+"','"+year+"','"+radio2+"','"+shipName+"','"+shipSurname+"','"+shipAddress+"','"+shipCity+"','"+shipCountry+"','"+shipPostalCode+"')");
p.executeUpdate();
 
Donna Harrington
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry put this message in wrong place!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic