Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT DISTINCT
- A.Dept_ID Dept_ID,
- C.Style_No Model_No,
- C.Style_Name Model_Name,
- C.Color_No Article,
- A.Work_Date Work_Date,
- A.MO_No
- FROM [TSH-MSSQL1].[TSHMES].[dbo].[MES_Yield_Log] AS A
- LEFT JOIN [TSH-MSSQL1].[TSHMES].[dbo].[MES_Dept] B ON A.Dept_ID = B.Dept_ID
- LEFT JOIN [TSH-MSSQL1].[TSHMES].[dbo].[MES_MO] C ON A.MO_No = C.MO_No AND A.Seq = C.MO_Seq
- WHERE A.Work_Date = CAST(getdate() AS DATE) AND A.Time_Bucket IS NOT NULL AND C.Style_No IS NULL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement