Click here to Skip to main content
15,921,959 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i want to put the column (ToLocationLagerScandCode)together with column (ToLocationHandlingUnitsScandCode) insaid one column without the null .

What I have tried:

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
Posted
Updated 28-Nov-19 21:50pm
v3
Comments
Maciej Los 28-Nov-19 12:59pm    
Your question is not clear. Can you provide smaple data?
Use Improve question widget.
[no name] 29-Nov-19 3:50am    
i did
Maciej Los 29-Nov-19 4:55am    
No, you didn't. I see no examples.

1 solution

select coalesce(ToLocationLagerScandCode,handling.Scancode) As ToLocationHandlingUnitsScandCode from ItemHistory itemH where coalesce(ToLocationLagerScandCode,handling.Scancode) IS NOT NULL
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900