|
Posted by Afshin Alikhani on January 5, 2007, 7:54 am
Please log in for more thread options
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
Afshin Alikhani - [ afshin@retailrealm.co.uk ]
CEO - Retail Realm
url: http://www.retailrealm.co.uk = = = = = = = = = = = = = = = = =
> 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?
|