Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using Variables to UPDATE

 
Barry Andrews
Ranch Hand
Posts: 529
C++ Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could someone please provide a correct syntax for the following code? I am trying to use a String variable to do an update to a table. Thanks a lot!
<CODE>
String myVariable = "TableName";
updateString = "UPDATE " + myVariable +
"SET PROJECT = 'QA' " +
"WHERE PROJECT = 'SYSADM'";
</CODE>
 
Michael Hildner
Ranch Hand
Posts: 297
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A space before SET PROJECT?
 
Barry Andrews
Ranch Hand
Posts: 529
C++ Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes! Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic