I'm creating a temp table to hold various data from multiple tables. and I'm having a problem with one statement (see code section) in the v_PlannedProduction table it can hold the same item number twice with more than one start date. All i need to do is get the first instance of the start date for my temp table.
cheers
Code:
update temp_Cuts set ProductRunDate = (SELECT StartDate, ItemNumber
FROM v_PlannedProduction
where temp_Cuts.ItemNumber = v_PlannedProduction.ItemNumber
GROUP BY ItemNumber, StartDate
)
cheers