I have the following Table:
Thus, whenever I have common “J No”, I would like to perform the following calculations:
Take only the 1st value from “Set up Start” and combine it with the last two values from “Run Start” and “Run End” and delete any records in between them.
Here is my Query code:
SELECT TOP (1000) [LineNo] ,[J No] ,[FC] ,[SetupStart] ,[UpTimeStart] ,[UpTimeEnd] ,[Setup] ,[UpTime] ,[Targ Len] ,[Act Len] ,[R Up F] ,[R Dn F] ,[Scrap] FROM [Initial].[dbo].[vWGetProductionInfo] ORDER BY SetupStart ASC, UpTimeEnd ASC
How would I do modify this query to give me the desired output I have listed above?