SELECT
(CASE
WHEN News_Data.Type = 1 THEN (SELECT Sys_Department.Name FROM Sys_Department WHERE Sys_Department.Id = News_Data.ObjectId)
WHEN News_Data.Type = 2 THEN (SELECT Basic_Community.Name FROM Basic_Community WHERE Basic_Community.Id = News_Data.ObjectId)
WHEN News_Data.Type = 3 THEN (SELECT Basic_Property.Name FROM Basic_Property WHERE Basic_Property.Id = News_Data.ObjectId)
WHEN News_Data.Type = 4 AND ObjectId != '00000000-0000-0000-0000-000000000000' THEN (SELECT Basic_HousingEstate.Name FROM Basic_HousingEstate WHERE Basic_HousingEstate.Id = News_Data.ObjectId)
WHEN News_Data.Type = 4 AND ObjectId = '00000000-0000-0000-0000-000000000000' THEN ''
ELSE ''
END
)ObjectName,*
FROM News_Data WHERE State= 1
相关文章
- 02-28AZ-103-001-Case Study-确保Web管理员快速部署Web应用
- 02-28怎么在大学当院系负责人呢?一个case study
- 02-28第七天 位置参数 变量运算if case || && find locate compress
- 02-28Codeforces 555E. Case of Computer Network 题解
- 02-28no response when ping MS Cluster’s ip address – Solution
- 02-28switch...case... 语句中的类型转换
- 02-28IllegalArgumentException: When allowCredentials is true, allowedOrigins cannot contain the special v
- 02-28SpringBoot跨域问题:When allowCredentials is true, allowedOrigins cannot contain the special value “*“sin
- 02-28When allowCredentials is true, allowedOrigins cannot contain the special value "*"since th
- 02-28一步解决Error while building/deploying project MyQtDemo (kit: Desktop Qt 5.7.0 MSVC2015 32bit) When exec