|
sql
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
update multiple records in one go
I want to update multiple records in one instance, it can even be a
storedprocedure. I have data from user on a asp page. these are number of records with different unique identifiers. how can i update the corrensonding table with all these records with one update query. Can somebody please give me some example. Thank in advance, --Nitu Following will update the "YourColumn" column of "YourTable" with the value
'YourData', for rows where the PK column is 'Row1', 'Row2', or 'Row3': UPDATE YourTable SET YourColumn = 'YourData' WHERE YourPK IN ('Row1', 'Row2', 'Row3') -- Adam Machanic Pro SQL Server 2005, available now http://www.apress.com/book/bookDisplay.html?bID=457 -- "Nitu via SQLMonster.com" <u18088@uwe> wrote in message news:5af30607d4efc@uwe...Show quoteHide quote >I want to update multiple records in one instance, it can even be a > storedprocedure. > > I have data from user on a asp page. these are number of records with > different unique identifiers. how can i update the corrensonding table > with > all these records with one update query. > > Can somebody please give me some example. > > Thank in advance, > --Nitu > > -- > Message posted via SQLMonster.com > http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200601/1 |
|||||||||||||||||||||||