A problem in returning a table with Null On it

后端 未结 3 912
Happy的楠姐
Happy的楠姐 2021-01-28 05:53

i want my function to return a A table with some values

I must fix something in the update but i don\'t know what this is the function FngetTableH BELOW



        
3条回答
  •  甜味超标
    2021-01-28 06:47

    Use top to select 1 record. May be it will solve your error.

    select Distinct 0 , IdValeur
    From Historique
    Update @Listeab_
    Set CLOSING_PRICE = (Select  Top 1 CLOSING_PRICE
    from Historique H
    inner join (Select MAX(@Date) As DATEDU,IdValeur FROM Historique
    where 
    DATE_NEGO<= @Date 
    group by IdValeur ) L2
    on 
    H.DATE_NEGO=L2.DATEDU and H.IdValeur=L2.IdValeur
    )
    

提交回复
热议问题