このクエリを書く他の方法は何ですか??
Update TempTableDisplay
SET _cPayment = case When exists(
select Tofield from #UFTFMappingTempTable where ToField='Payment')
then IsNull(S.Payment,0)
else dbo.fnGetMaximum((ISNULL(M.NetTaxDue0,0) + ISNULL(M.NetTaxDue1,0) + ISNULL(M.NetTaxDue2,0) + ISNULL(M.NetTaxDue3,0) + ISNULL(M.NetTaxDue4,0) + ISNULL(M.NetTaxDue5,0) + ISNULL(M.NetTaxDue6,0)),0)
end