ChengDa_English/DataBase/View_Law_RulesRegulations_2...

31 lines
697 B
Transact-SQL

ALTER VIEW [dbo].[View_Law_RulesRegulations]
as
select
R.RulesRegulationsId,
R.RulesRegulationsCode,
R.RulesRegulationsName,
R.RulesRegulationsTypeId,
R.CustomDate,
R.ApplicableScope,
R.Remark,
R.AttachUrl,
R.CompileMan,
R.CompileDate,
R.IsPass,
R.UnitId,
R.IsBuild,
T.RulesRegulationsTypeCode AS RulesRegulationsTypeCode,
T.RulesRegulationsTypeName AS RulesRegulationsTypeName,
Substring(R.AttachUrl,charindex('~',R.AttachUrl)+1,LEN(R.AttachUrl)) as AttachUrlName,
(CASE WHEN IsBuild = 1 THEN '¼¯ÍÅ' ELSE '¹«Ë¾' END ) AS IsBuildName
FROM dbo.Law_RulesRegulations AS R
LEFT JOIN dbo.Base_RulesRegulationsType AS T ON T.RulesRegulationsTypeId=R.RulesRegulationsTypeId
GO