Friday 3 February 2017

Stored Procedure for Part No Duplicate in Item Master




IF @transaction_type in ('U', 'A' ) AND @object_type = '4' 

BEGIN

If 1 < (SELECT count(T1.FrgnName) FROM OITM T1 
where T1.FrgnName in (SELECT T0.FrgnName FROM OITM T0 WHERE T0.ItemCode =@list_of_cols_val_tab_del and (t0.frgnName not in ( '*for inventory*' )))) 
Begin
SET @error = 4013
SET @error_message = N'Part Number cannot be duplicated, Please check again !!!'

End
END

1 comment: