Deleting Quotes

Jan 04, 2007 1 Replies

Most relevant reply

Afshin Alikhani

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…

Read the full reply

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?


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

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required