select Top (100) itemH.ProduktID,p.P_NavArtNr as ProduktNavArtNr,p.P_Name as PName, lager.Scancode as ToLocationLagerScandCode,handling.Scancode as ToLocationHandlingUnitsScandCode, lager2.Scancode as FromLocactionLagerScandCode ,handling2.Scancode as FromLocactionHandlingUnitsScandCode, itemH.Date from ItemHistory itemH join Produkte p on itemH.ProduktID = p.P_ID left Join Lagerort lager on itemH.ToLocation = lager.LagerID left join HandlingUnits handling on itemH.ToLocation = handling.Unit_ID left join Lagerort lager2 on itemH.FromLocation = lager2.LagerID left join HandlingUnits handling2 on itemH.FromLocation = handling2.Unit_ID order by itemH.Date desc
select coalesce(ToLocationLagerScandCode,handling.Scancode) As ToLocationHandlingUnitsScandCode from ItemHistory itemH where coalesce(ToLocationLagerScandCode,handling.Scancode) IS NOT NULL
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)