more SQL database conversion for inventory