can you please help,
the case statement is not working.
if POD column is Empty, then Updated Column is Null else 'YES'
POD = DATABASE2.POD,
PickedUpTime = DATABASE2.PickedUpTime,
DeliveredTime = DATABASE2.DeliveredTime,
CCDriverNumber = DATABASE2.PickupDriver,
Instructions = DATABASE2.Instructions,
StatusID = DATABASE2.StatusID,
ServiceTypeID = DATABASE2.ServiceTypeID,
Updated = Case when POD = '' THEN Updated = Null Else 'YES' End,
OrderDate = DATABASE2.OrderDate
FROM DATABASE2.dbo.ActiveOrders DATABASE2 , DATABASE1.dbo.ScanItem ScanItem
WHERE DATABASE2.OrderNo = ScanItem.CCOrderNo
And DATABASE2.AccountNumber = 3333 and ScanItem.Updated is Null
Any help is appreciated.