这怎样去除空值,显示
SELECT
a.矫正预防表单_ID,
max(case a.部门名字 when "业务" then a.成员名字 else null end) as "业务",
max(case a.部门名字 when "工程" then a.成员名字 else null end) as "工程",
max(case a.部门名字 when "采购" then a.成员名字 else null end) as "采购",
max(case a.部门名字 when "品保" then a.成员名字 else null end) as "品保",
max(case a.部门名字 when "管理" then a.成员名字 else null end) as "管理",
max(case a.部门名字 when "销售" then a.成员名字 else null end) as "销售",
max(case a.部门名字 when "资材" then a.成员名字 else null end) as "资材",
max(case a.部门名字 when "压铸" then a.成员名字 else null end) as "压铸",
max(case a.部门名字 when "CNC" then a.成员名字 else null end) as "CNC",
max(case a.部门名字 when "表面处理" then a.成员名字 else null end) as "表面处理",
max(case a.部门名字 when "烤漆" then a.成员名字 else null end) as "烤漆",
max(case a.部门名字 when "品检" then a.成员名字 else null end) as "品检",
max(case a.部门名字 when "财务" then a.成员名字 else null end) as "财务",
max(case a.部门名字 when "总经理" then a.成员名字 else null end) as "总经理",
max(case a.部门名字 when "生产" then a.成员名字 else null end) as "生产",
max(case a.部门名字 when "董事长" then a.成员名字 else null end) as "董事长"
FROM "矫正预防表单_子表" as a
group by a.ID
order by a.矫正预防表单_ID
|