Can you please help,
I use below code
SELECT WaybillNumber, ShipmentDate,Scanin,ScantoTtruck FROM ScanItem WHERE shipmentdate > = (Select datediff(d, 0, getdate())-7) AND ScanIn IS NOT NULL and Scanin = (SELECT MAX(Scanin) FROM ScanItem);
This will give me the max scanin for all 7 days,
I need to have the max scanin per day.
how do I update
Update scanitme set scanin = dateadd(second,5, MAX SCANIN) FROM ScanItem);--- for that specific shipmentdate
Any help is appreciated,