Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Copying column values in one row from another row in the same table

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-06-17 : 19:19:22
Robert writes "I'm trying to "duplicate" the values from one row to a second row in the same table. I know I can use subqueries for each column value but I want to use an update from clause to "join" the same table a second time. e.g.,

update product
set description=b.description,
keywords=b.keywords
from product b
WHERE b.id = 575 --from
and id=576 --to

The syntax is correct but the code doesn't do anything!

Help!"
   

- Advertisement -