If the DB 4 error references a blank item_id:

The first thing to do is to go into the inventory master and see if the item has been deleted. However, notice, it doesn’t reference an item id. So, in this instance, go to the inventory_qty_detail table and look for any entries that do not have an item id. The command is:

Select * from "inventory_qty_detail" where item_id = ' ' and non_unique_tag_no = ' '

The reason you have to include when the non_unique_tag_no is blank is because when you do an unposted receiving and assign a tag, the system will put a tag in the inventory qty table with no item id has a place holder to keep that tag and make sure no one else uses that tag. With the command above, you get rid of only bogus tags.

The sql statement above will show you all of the rows of items without an item id. If you remove those with the statement below, it will be fine.

delete from "inventory_qty_detail" where item_id = ' ' and non_unique_tag_no = ' '