>>Can anyone tell me which values the update table columns are set to when more than one row in the other table is returned from the nested query?I don't see a nested query in your example. But to answer your question:In a way, all of them. You only see the effects of the last one. Generally speaking you can't reliably predict/know which of the rows is the final updated value.EDIT:one way to insure that you get just one particular row as your source values to update for a given (FundID,DataDate) is with this technique. You just need to define the ORDER BY to whatever makes sense:UPDATE a SET a.FADailyDivRate = ca.DailyDividendRate, a.FANetAsset = ca.NetAssets, a.FADailyYield = ca.DayYield1, a.FAWeekYield = ca.DayYield7, a.FAMonYield = ca.DayYield30FROM tbl_fund_history across apply ( select top 1 b.DailyDividendRate, b.NetAssets, b.DayYield1, b.DayYield7, b.DayYield30 from tbl_l1_fund_accounting b where b.FundID = a.FundID and b.DataDate = a.DataDate and b.NetAssets is not null ORDER BY <SOME COLUMN(s)> ) ca
Be One with the OptimizerTG