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)
 updating one column (all rows) with an inner join?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-10-28 : 16:28:00
Naz writes "I have 1 product table (15,000 rows). One column (all rows) - currently holding nul values, which will hold the product type ID needs to be updated with the results of the following inner join:

select tblMasterType.masterTypeID
from tblProduct
inner join
tblMasterType
on
tblProduct.tempType = tblMasterType.masterTypeName;

How do I insert/update multiple rows with the results of an inner join - as update does not allow multiple updates all with different values?

Thanks in advance.
Naz."
   

- Advertisement -