xinjiang/DataBase/版本日志/SGGLDB_V2023-08-11.sql

23 lines
632 B
MySQL
Raw Permalink Normal View History

2024-11-19 09:45:27 +08:00
CREATE VIEW [dbo].[View_NoCheckWelder]
as
select
distinct(welder.WED_ID),
joint.ProjectId,
welder.WED_Unit,
welder.WED_Code,
welder.WED_Name,
Unit.UnitName,
joint.ISO_ID
from PW_JointInfo as joint
left join BS_Welder as welder on welder.WED_ID = joint.JOT_CellWelder
LEFT JOIN Base_Unit AS Unit ON Welder.WED_Unit = Unit.UnitId
where welder.WED_IfOnGuard='1'
and (welder.WederType='1' or welder.WederType is null)
and (welder.WED_ID in(select JOT_CellWelder from PW_JointInfo where DReportID is not null))
and (welder.WED_ID not in(select JOT_CellWelder from PW_JointInfo where JOT_ID in (select JOT_ID from CH_CheckItem)))
GO