CREATE PROCEDURE MIG_CAT_LIST_VALUES_Sp
AS
BEGIN
	DELETE FROM MIG_CAT_LIST_VALUES

	INSERT INTO MIG_CAT_LIST_VALUES
	SELECT DISTINCT  CATEGORY_ID, ATTR_NAME, [TYPE_NAME], VALUE_ID, SHORT_DESCR  
	FROM CATEGORY_ATTRS  
	INNER JOIN ZZ_UDCDTYPE 
		ON [TYPE_NAME] = UDTP_REFERENCE  
	WHERE UDTP_REFERENCE <>''  AND UDTP_REFERENCE <> 'UNCH_YES/NO' 

END

