TSQL - If..Else statement inside Table-Valued Functions - cant go through

后端 未结 7 1381
情话喂你
情话喂你 2021-02-07 02:51

Before posting I have read few articles about developing USD functions, but have not encountered solutions for my problem... which is as follows:

I have a very simple da

7条回答
  •  灰色年华
    2021-02-07 03:43

    Why are you hardcoding this, create a heights table and then grab all the heights that are valid for the range

    SELECT * from player p
    join Heights h on p.height between h.heightStart and h.heightEnd 
    WHERE h.height  = @set
    

提交回复
热议问题