SQL 查询语句 注释
SELECT a.ID,o.UID as OrderDocUID,o.OrderStyleID,a.StyleDocTreeID,a.BOMType,o.OrderDocType,a.Code,a.IsCheckMaterial,a.IsCalculation,a.IsCheckPrice,a.IsPurchase,a.IsReceive, a.IsStockIn,a.IsFollowDoc,a.IsAssign,a.IsAssistantMaterial,a.IsMainMaterial,a.FilingUp,a.IsIntact, a.IsSubmit,a.SubmitDate,a.CheckState,a.CreateDate,a.CreateUserID,a.LastModifiedDate,a.ReferenceDate, tp.Name as TechnicPerson,ac.Name as CreateUserName,Cast(null as Image) as StyleImage, a.LastModifiedUserID,a.IsBreakDown,a.BreakDownDate,a.HasHanged,a.Remark,am.Name as LastModifiedUserName , o.DocCode as OrderCode,o.Code as StyleCode ,o.Name as StyleName,o.SessionType,cs.CustomName FROM OrderStyleBOM as a INNER JOIN view_OrderStyleExtend_ALL o ON a.StyleDocTreeID = o.StyleDocTreeID LEFT JOIN view_GoodsType vg on vg.ID = o.GoodsType LEFT JOIN AC_User tp ON o.TechnicPerson = tp.ID LEFT JOIN AC_User ac ON a.CreateUserID = ac.ID LEFT JOIN AC_User am ON a.LastModifiedUserID = am.ID LEFT JOIN Custom cs ON cs.ID = o.CustomID WHERE o.[DocCode] LIKE '%120392%' and a.BOMType = 0