select deptcode1 + deptcode2 + deptcode3 as dpcode,
case when deptname2 = '' then deptname1 when deptname2 <> '' and
deptname3 = '' then deptname1 + '/' + deptname2 when deptname2 <> '' and
deptname3 <> '' then deptname1 + '/' + deptname2 + '/' + deptname3 end as dpname
from dbo.department
新闻热点
疑难解答