This worked before but now it isn’t working and I’m very confused. I reviewed the whole thing and it all looks fine but maybe somebody more advanced can spot something?
Here’s the script:
UPDATE Orders SET Orders.OrderStatus = 'Shipped',Orders.SalesRep_CustomerID = null
WHERE Orders.OrderStatus in ('Pending','Processing')
AND Orders.PaymentAmount = Orders.Total_Payment_Received
AND Orders.ShipDate < dateadd(day, -60, convert(char(10), getdate(), 101))
AND Orders.Shipped = Y
All I’m getting is an Error, no explanation. Can somebody spot an error, I’m sure it’s obvious I’m just too new to SQL to identify it. Thanks
Not sure what the error you’re getting is, but you need to have Y in quotes.