--委托明细表查询列表 ALTER VIEW [dbo].[HJGL_View_CH_TrustItem] /*委托明细表查询列表*/ AS SELECT TrustItem.CH_TrustItemID, --委托明细id TrustItem.CH_TrustID, -- 委托id JointInfo.JOT_ID, --焊口id IsoInfo.BAW_ID, ---施工区域id JointInfo.InstallationId, --装置id Installation.InstallationName, Trust.CH_TrustType, Trust.CH_TrustDate, IsoInfo.ISO_IsoNo, JointInfo.JOT_JointNo, TrustItem.CH_Remark, CAST(JointInfo.JOT_Dia AS DECIMAL(18,2)) AS JOT_Dia, JointInfo.JOT_Sch, JointInfo.WLO_Code, WeldMethod.WME_Name, JointInfo.ProjectId, JointInfo.WME_ID, JointInfo.JOT_JointStatus, TrustItem.FeedbackDate FROM dbo.HJGL_PW_JointInfo AS JointInfo LEFT JOIN dbo.HJGL_CH_TrustItem AS TrustItem ON JointInfo.JOT_ID = TrustItem.JOT_ID LEFT JOIN dbo.HJGL_CH_Trust AS Trust ON Trust.CH_TrustID=TrustItem.CH_TrustID LEFT JOIN dbo.HJGL_PW_IsoInfo AS IsoInfo ON JointInfo.ISO_ID = IsoInfo.ISO_ID LEFT JOIN dbo.Project_Installation AS Installation ON JointInfo.InstallationId = Installation.InstallationId LEFT JOIN dbo.HJGL_BS_WeldMethod AS WeldMethod ON WeldMethod.WME_ID=JointInfo.WME_ID GO