This SQL query selects all equipment inspection line information from the table xx_equip_insp_lineinfo, along with information about the equipment itself from the tables xx_equipment_detail, xx_equipment_info, and xx_equip_insp_detail.

The query selects only distinct equipment names, equipment barcodes, departments, codes, and organization codes from these tables, where the equipment and inspection details are enabled and match in department, code, and organization code.

The results are ordered by organization code, department, code, and equipment barcode.

The query then joins the xx_equip_insp_lineinfo table with the equipment information based on matches in organization code, department, and equipment barcode, where the line information is also enabled and in department 'CHZ11'.

The final results are ordered by organization code, department, line, code, and equipment barcode

SELECT aline e FROM xx_equip_insp_lineinfo a SELECT DISTINCT dequipment_name bequip_barcode bdept bcode

原文地址: https://www.cveoy.top/t/topic/e013 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录