Deleting items

I have a lot of old or discontinued items in my database. I was wondering if their is a safe easy way to delete a lot of items (with out doing them one at a time from POS or MGR)? I was going to do a sql delete but that is not good because you need to delete all the tables that link to that item table etc.

Any ideas? Thanks Brent

Reply to
Brent
Loading thread data ...

We have add-ons that can either Archive the data [rather than delete] or another add-on [Store Utility] that does allow to delete items as long as the items are not linked to a PO, Transfers, Work Order, Layaway, Back Order, Accounts Receivable or has a stock greater than zero.

Please contact me if you wish to know more

Reply to
Afshin Alikhani

Reply to
Akber Alwani

Hi Brent - Have you thought about maybe making these items inactive? I understand that if you delete the item you will lose transaction history as well, so you won't be able to report against the deleted items.

some select queries you can consider are... select * from item where lastsold like '%2002%' and quantity = 0;

this will show you items that have quantity on hand of zero and were last sold in 2002; depending on your criteria for making the items inactive, you would add additional constraints to your select query.

Once you're happy with the result of your select query you can run an update query to flag the items as inactive; the query would be

update item set inactive = 1 where lastsold like '%2002%' and quantity = 0;

REMEMBER TO BACKUP FIRST....also consider doing this after hours. It's important that you run the select query first so that you can see which items will be affected....hope this helps.

"Brent" wrote:

Reply to
convoluted

This suggestion does not cover all eventualities and can leave orphan records.

- if item is on order - if item is in transfer - if item is on A/R and the A/R is still not paid - if item is on WO, Layaway, etc...

Reply to
Afshin Alikhani

Reply to
convoluted

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.