Deleting Quotes

We have dozens of quotes built up over the past year. Is there an easy way to delete the ones that are no longer valid?

Reply to
Lance
Loading thread data ...

If you are at a store you can use this script through MS Administrator. Change the Set @DayBefore = 30 to be the number of days you want so from 30 to 60 etc...

Declare @DayBefore Int Set @DayBefore = 30

Begin Transaction

Update [OrderEntry] Set QuantityOnOrder = 0 Where OrderID In (Select ID From [Order] Where Type = 3 And Closed = 0 And Datediff(Day,[Time],Getdate()) > @DayBefore)

Update [Order] Set Closed = 1 Where ID In (Select ID From [Order] Where Type = 3 And Closed = 0 And Datediff(Day,[Time],Getdate()) > @DayBefore)

Commit Transaction

Reply to
Afshin Alikhani

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.