CREATE PROCEDURE dbo.wec_GetWeight(@weight_kg varchar(10) output, @CurrWeight numeric(8,3)) AS BEGIN if @Weight_Unit = g then Set @weight_kg = @CurrWeight / 1000 else if @Weight_Unit = kg then Set @weight_kg = @CurrWeight else if @Weight_Unit = t then Set @weight_kg = @CurrWeight*1000 end if end if end if END Go