sql - using a case statement inside a string -


i need put case statement in string. how can achieved?

select datediff(mm, select case fa.new_ownertype         when 8 fa.new_vlenrollmentstartdate         else fa.new_contractstartdate bingmapsplatform_stagging.dbo.filteredaccount fa         end, getdate()) 

select datediff(mm,     case fa.new_ownertype     when 8 fa.new_vlenrollmentstartdate     else fa.new_contractstartdate     end, getdate()) bingmapsplatform_stagging.dbo.filteredaccount fa 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -