T-SQL Case Statement in a JOIN ON Clause

后端 未结 6 2032
隐瞒了意图╮
隐瞒了意图╮ 2021-01-12 15:09

I am trying to build a case/if statement in a JOIN ON clause.

LEFT JOIN [CTSTRC] [Statuses] ON RIGHT([Statuses].[STRID], 3) = [CTE].[F61]
         


        
6条回答
  •  不要未来只要你来
    2021-01-12 15:44

    You can try to create an expression column in the Statuses table that converts the right 3 characters to a number and then try to join on the expression column.

提交回复
热议问题