You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1016 B
SQL

-- 创建基础联合视图
CREATE OR REPLACE VIEW V_QUALITY_INSPECTION_UNIFIED AS
SELECT
obj_id,
bar_code,
material_name,
process_code,
test_item_code,
quality_defect_code,
quality_defect_name,
treatment_measure,
process_result,
is_lower_line,
group_code,
inspector_code,
inspector_time,
rework_number,
finish_time,
is_flag,
updated_by,
updated_time,
station_code,
submint_qualty_id,
'REPORT_QUALITY_INSPECTION' AS SOURCE_TABLE
FROM REPORT_QUALITY_INSPECTION
UNION
SELECT
obj_id,
bar_code,
material_name,
process_code,
test_item_code,
quality_defect_code,
quality_defect_name,
treatment_measure,
process_result,
is_lower_line,
group_code,
inspector_code,
inspector_time,
rework_number,
finish_time,
is_flag,
updated_by,
updated_time,
station_code,
submint_qualty_id,
'REPORT_QUALITY_INSPECTION_1' AS SOURCE_TABLE
FROM REPORT_QUALITY_INSPECTION_1
;