Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Batch processing

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I have a table a1 in MYSQL. Its columns are "identity"(type int) and "name"(type varchar).

I am having two entries in table a1 whose "name" column has value = abc.

I am trying to set the value of the "name" column of these two entries using batch update.

Here's the code fragment:



But when i run this program, i am getting the following message:

expecting DOT, found '=' near line 1, column 19 [Update a1 set name=? where name=?]

Could anybody kindly tell me where i went wrong and what i should do to rectify the error?

Thanks,
Subhash
 
subhashchandra medhiassam
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
My problem has been fixed. I have changed the HQL query a bit and its working now.

My changed query is "Update a1 a set a.name=? where a.name=?".

Thanks,
Subhash
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic