update i_uniqueitem i
set    i.sizecode = upper(trim(i.sizecode))
where  i.sizecode <> upper(trim(i.sizecode));

-- Create/Recreate check constraints 
alter table i_uniqueitem 
  add constraint i_uniqueitem_sizecheck 
  check(sizecode = upper(trim(sizecode)));

update i_wearerinventory i
set    i.sizecode = upper(trim(i.sizecode))
where  i.sizecode <> upper(trim(i.sizecode));

-- Create/Recreate check constraints 
alter table i_wearerinventory 
  add constraint i_wearerinv_sizecheck 
  check(sizecode = upper(trim(sizecode)));

update i_uniquepool i
set    i.sizecode = upper(trim(i.sizecode))
where  i.sizecode <> upper(trim(i.sizecode));

-- Create/Recreate check constraints 
alter table i_uniquepool 
  add constraint i_uniquepool_sizecheck 
  check(sizecode = upper(trim(sizecode)));

update i_deliveryvariation i
set    i.sizecode = upper(trim(i.sizecode))
where  i.sizecode <> upper(trim(i.sizecode));

-- Create/Recreate check constraints 
alter table i_deliveryvariation 
  add constraint i_deliveryvar_sizecheck 
  check(sizecode = upper(trim(sizecode)));   

-- Drop primary, unique and foreign key constraints 
alter table I_UNIQUEITEM
  drop constraint I_UNIQUEITEM_CUSTOMERNUMBER___;
-- Create/Recreate primary, unique and foreign key constraints 
alter table I_UNIQUEITEM
  add constraint I_UNIQUEITEM_WEARER foreign key (CUSTOMERNUMBER, WEARERNUMBER, WEAREREMPLOYMENTNUMBER)
  references I_WEARER (CUSTOMERNUMBER, WEARERNUMBER, WEAREREMPLOYMENTNUMBER);  
  