| | |
update two rows in one query
Please support our MS SQL advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Mar 2007
Posts: 28
Reputation:
Solved Threads: 0
Yes, you need to separate them. The syntax should be more like
It doesn't look like you need a subquery either. A simple join should be sufficient. Something like
MS SQL Syntax (Toggle Plain Text)
UPDATE SomeTable SET Column1 = SomeValue1, Column2 = SomeValue2, Column3 = ....
It doesn't look like you need a subquery either. A simple join should be sufficient. Something like
MS SQL Syntax (Toggle Plain Text)
UPDATE t1 SET t1.ID = tmp.ID, t1.[DESC] = tmp.[DESC] FROM tmptable tmp INNER JOIN table1 t1 ON tmp.ID_SUN = t1.ID_SUN
![]() |
Similar Threads
- how to delete duplicate record in a table by using SQL query (MS SQL)
- updating multiple rows with one form (PHP)
- vb6 update record in the database (Visual Basic 4 / 5 / 6)
- help a newbie? mySQL find & replace (MySQL)
- Double MySQL Query (PHP)
- Using MySQL with PHP - Tutorial by Herong (MySQL)
- multiple row update (C#)
- how do i update to Access db? (C#)
- Mysql num rows(): Invalid argument (PHP)
- Querying within the results of a previous query? (MySQL)
Other Threads in the MS SQL Forum
- Previous Thread: Query Total Asset
- Next Thread: Checking for banned words
| Thread Tools | Search this Thread |
Tag cloud for MS SQL
"last autogrowth business connectingtodatabaseinuse count cursor data database dateadd datepart day" dbsize deadlock delete_trigger getdate highperformancecomputing hpc hpcserver2008 ibm iis limit loop maximum microsoft ms mssql multiple multithreading news number permission position query reporting result server services sets single source sql sqlserver sqlserver2005 subtype supercomputing supertype tables uniqueid update view weekday





