This SQL query will set the warehouse summary items UnitID and UnitType to the Part's UnitID and InventoryUnitType.

High. Data is modified in this query. Do not run this except under the direction of a Cyrious Technical Support staff member. Doing otherwise may result in lost or contaminated data. All data modifications done through direct SQL are permanent and non-reversable.

update Inventory

set UnitID = p.UnitID,

UnitType = p.InventoryUnitType,

ModifiedDate = GETDATE(),

ModifiedByUser = 'CyriousUpdate'

from Inventory i with(nolock)

left outer join Part p with(nolock) on i.PartID = p.ID

where ( i.ClassTypeID = 12202 ) and p.ID IS NOT NULL and ( p.UnitID i.UnitID )

  • Entered : 7/26/2010
  • Version : 4.5.1007.3001
You could leave a comment if you were logged in.