Once I run this query I get the following error
UPDATE stockloan_feed
SET CUSIP =(
SELECT CUSIP FROM stockloan_feed_cusip_matching
WHERE stockloan_feed_cusip_matching.SEDOL = stockloan_feed.SEDOL OR
stockloan_feed_cusip_matching.ISIN = stockloan_feed.ISIN)
WHERE CUSIP IS NULL and date = DATEDIFF(d, 0, GETDATE()-1)
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
1 Answer