|
Posted by Akber Alwani on March 27, 2007, 7:55 pm
Please log in for more thread options
Hi Robert,
if you want you can add additional criteria i.e. specific department,
particular period of time sale etc. here are 2 for you:
By Department:
UPDATE ITEM
SET INACTIVE = 1
FROM DEPARTMENT
WHERE DEPARTMENT.ID=DepartmentID
AND QUANTITY = 0
AND DEPARTMENT.NAME='Action'
The same you can apply add 2 more tables for [Transaction] and
TransactionEntry to make join and then specify the sales period of time as
filter criteria.
"Robert" wrote:
> How can i specify to run this by department name ?
> Can i also add a filter last sold before specific date ?
> Thanks
>
>
>
>
> "convoluted" wrote:
>
> > Hi Robert
> > Keep in mind that setting the item as inactive will also make it inactive
> > for physical inventory purposes...if this is fine with you, here's the sql
> > query you need...
> >
> > In SO administrator, connect to your database
> > BACKUP FIRST...!
> > THEN run the following query
> >
> > UPDATE ITEM
> > SET INACTIVE = 1
> > WHERE QUANTITY = 0;
> >
> > You may want to do this after the store closes just to make sure it affects
> > the items that you know should be affected....or you may consider adding an
> > additional constraint to the query, such as adding a specific supplier code
> > that you know has many items that fit in this category...hope this helps
> >
> >
> >
> > "Robert" wrote:
> >
> > > I'm trying to cleanup my database for few reasons.
> > >
> > > Is there a way to make all items that On hand QTY of 0 Inactive ?
> > > This would help me i generating reports and printing labels.
> > >
> > > I tired inventory wizard and filters but the On hand qty is not one of
the
> > > filter options.
> > > Seems this should be easy to run as SQL Query but i do not know the command
> > >
> > > Thanks for all help
> > >
> > >
> > > Thanks
> > > Robert
> > >
|