• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in SQL/Java

 
Raosaheb Patil
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
while( icnt<10 )
{

sql="INSERT INTO NJADE.ESA91CNTMQY"
+ "("
+ "LK,"
+ "DK,"
+ "PS,"
+ "FY"
+ ")"
+ "VALUES"
+ "("
+ "ER" + "'" + cnt + "',"
+ "'E',"
+ "'O',"
+ "10"
+ " )";
stmt = con.prepareStatement( sql );
cnt++;
}
[ January 09, 2004: Message edited by: Bear Bibeault ]
 
SJ Adnams
Ranch Hand
Posts: 925
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably should be "'ER" + ..
use stmt.setString("ER"); it's much easier
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic