I am trying to pull in some data from a sql table to another and getting this error when trying to process as follows:
Msg 512, Level 16, State 1, Line 3
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.
set DistributorTo_ID = (select DistributorTo_ID from StockAllocations where StockAllocations.ControlNo_ID= SIMs.ControlNo_ID)