SQLSERVER 脚本
1.自关联字段键值翻译:
select a.name,case when a.location='T' then '顶部显示' when a.location='L' then '左侧显示' when a.location='R' then '普通栏目' else '上方' end as locationname,c.name as parent, b.Dept from ((sitecolumn a left outer join organization b on a.dept = b.id ) left outer join sitecolumn c on a.parent =c.id and c.dept = 0 )
1.自关联字段键值翻译:
select a.name,case when a.location='T' then '顶部显示' when a.location='L' then '左侧显示' when a.location='R' then '普通栏目' else '上方' end as locationname,c.name as parent, b.Dept from ((sitecolumn a left outer join organization b on a.dept = b.id ) left outer join sitecolumn c on a.parent =c.id and c.dept = 0 )