aspose file tools*
The moose likes JDBC and the fly likes Query for multiple updations in a table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Query for multiple updations in a table" Watch "Query for multiple updations in a table" New topic
Author

Query for multiple updations in a table

sunita shaw
Ranch Hand

Joined: Apr 06, 2003
Posts: 45
UPDATE Ruby SET `eprodstatus` = 'InActive' where `vSKU` = '127712' , '127713' , 127714';

I want to set the word "Inactive" in 3 of the rows to the field with vsku= '127712' , '127713' and 127714';
My above query does not work.What is the query for making multiple updation to a column
Kindly let me know urgently as I have a release and I am stuck!!!
Maximilian Xavier Stocker
Ranch Hand

Joined: Sep 20, 2005
Posts: 381
Use OR in your WHERE clause...

The ending query should look like


[ December 02, 2005: Message edited by: Maximilian Stocker ]
Mahesh Rana
Ranch Hand

Joined: Sep 05, 2001
Posts: 139
UPDATE Ruby SET eprodstatus = 'InActive'
WHERE vSKU IN ( '127712' , '127713' , 127714');


SCJP2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Query for multiple updations in a table