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.
Author |
Topic |
rookie_sql
Constraint Violating Yak Guru
443 Posts |
Posted - 2006-08-02 : 08:04:03
|
I would like to update a table based on the below query, but i keep getting the Error."Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.The statement has been terminated."update tbl_Voy_RCATransferset EmployeeID_HR = (SELECT dbo.tbl_login_ids.empl_idFROM dbo.tbl_Voy_RCATransfer INNER JOIN dbo.tbl_login_ids ON dbo.tbl_Voy_RCATransfer.Source_System = dbo.tbl_login_ids.source_system AND dbo.tbl_Voy_RCATransfer.EmployeeID COLLATE SQL_Latin1_General_CP1_CI_AS = dbo.tbl_login_ids.user_idWHERE (dbo.tbl_login_ids.source_system = 'voy')) |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-08-02 : 08:23:24
|
your subquery is returning more than one value.use inner join insteadupdate tbl_Voy_RCATransferset EmployeeID_HR = dbo.tbl_login_ids.empl_idfrom dbo.tbl_Voy_RCATransferinner join dbo.tbl_login_ids ON dbo.tbl_Voy_RCATransfer.Source_System = dbo.tbl_login_ids.source_system AND dbo.tbl_Voy_RCATransfer.EmployeeID COLLATE SQL_Latin1_General_CP1_CI_AS = dbo.tbl_login_ids.user_idWHERE (dbo.tbl_login_ids.source_system = 'voy') KH |
 |
|
|
|
|