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
 General SQL Server Forums
 New to SQL Server Programming
 Update multiple values from another table

Author  Topic 

davser
Starting Member

2 Posts

Posted - 2011-05-31 : 07:25:51
Hi guys

I'm trying to update myltiple values from another table

I try like this


update Timesheets
set UserTimesheetID = ( Select ut.id from uvw_TimesheetsLoadAll as t INNER JOIN
dbo.uvw_UserTimesheetsLoadAll AS ut ON ut.UserID = t.UserID)


(The views are just copies of the tables)

I just want that every users on timesheets, update his value UserTimesheetID to the value UserTimesheetID of the UserTimesheets.
What connects UserTimesheets to Timesheets it's the UserID.

The error is Subquery returned more than 1 value...

davser
Starting Member

2 Posts

Posted - 2011-05-31 : 07:45:08
I got it. Problem Resolved.
Go to Top of Page
   

- Advertisement -