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
 Transact-SQL (2000)
 Help with a update

Author  Topic 

Murray_67
Starting Member

11 Posts

Posted - 2005-07-26 : 13:07:21
UPDATE Customer
SET BirthDate = C.DOB FROM vbCustomer C
WHERE Customer.Code = C.Code

When I use the above update statement I get: "Subquery returned more than 1 value."

Any ideas on how I can update the Customer.BirthDate with C.DOB from my other table vbCustomer?

Thanks for your help

Murray

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2005-07-26 : 13:34:08
I think this is what you're trying to do:

update c set
c.BirthDate = vbc.DOB
from Customer c
join vbCustomer vbc
on c.code = vbc.code


Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -