Connecting Tech Pros Worldwide Forums | Help | Site Map

Multiple Data Update

Newbie
 
Join Date: Jul 2008
Posts: 4
#1: Sep 9 '08
Hi,

I want to update multiple row data on single click
Here is my code to update one row
sql="Update jobs SET instructions='"&instructions&"',date='"&date&" where job='"&job&"'"

Please help

Regards
Twin



shweta123's Avatar
Expert
 
Join Date: Nov 2006
Location: India,Pune
Posts: 686
#2: Sep 9 '08

re: Multiple Data Update


Hi,

To update multiple rows you should use IN operator in where condition. IN operator is used to match multiple records.
e.g
You have to make change in the sql query as follows :

sql="Update jobs SET instructions='"&instructions&"',date='"&date&" where job IN( '"&job&"'")

Here , job variable should contain the list of values to match.
Reply