我需要将 case 语句放在一个字符串中。如何做到这一点?
select DATEDIFF(MM, select CASE FA.new_ownertype
WHEN 8 then FA.new_vlenrollmentstartdate
ELSE FA.new_contractstartdate from BingMapsPlatform_Stagging.dbo.FilteredAccount as FA
END, GETDATE())
我需要将 case 语句放在一个字符串中。如何做到这一点?
select DATEDIFF(MM, select CASE FA.new_ownertype
WHEN 8 then FA.new_vlenrollmentstartdate
ELSE FA.new_contractstartdate from BingMapsPlatform_Stagging.dbo.FilteredAccount as FA
END, GETDATE())