Delete Items from HQ database

We have taken physical inventory of a store and sync it with HQ.

We notice at least 30% of the items are not from our database (they were wrongly entered).

We need to delete those items in HQ so we can sync it with the store and have the correct items for the store.

Whats the best way to delete these items, which are in "0" and no activity, in HQ database

Reply to
RicoTowers
Loading thread data ...

a query that would accomplish that task would look like this:

delete i from item i left join transactionentry e on i.id=e.itemid left join inventorytransferlog l on i.id=l.itemid where i.quantity=0 and e.id is null and l.id is null and itemtype=0

disclaimer: modify> We have taken physical inventory of a store and sync it with HQ. >

Reply to
Matt Hurst

Understood.

Besides the query, is there an > a query that would accomplish that task would look like this:

Reply to
RicoTowers

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.