CREATE TABLE MIG_MASKS_SEGMENTS (
		mask VARCHAR(15) NOT NULL,
		sgno INT NOT NULL,
		sgty INT NOT NULL,
		fval VARCHAR(15) NULL,
		sval VARCHAR(40) NULL,
		slen INT NULL,
		patn VARCHAR(32),
		incr VARCHAR(32) NULL,
		minv VARCHAR(32) NULL,
		maxv VARCHAR(32) NULL,
		updt DATETIME2  NOT NULL,
		PRIMARY_SIGN SMALLINT NOT NULL,
		CONSTRAINT PK_MIG_MASKS_SEGMENTS PRIMARY KEY (mask, sgno)
)



--SELECT	MASK_ID, '' sgno, -- generate seq no
--		'' as sgty, -- const value / sequence based on MASK like DOC-?????? => DOC CONSTANT ????? => sequence
--		'' as fval, -- empty
--		'DOC' as sval, -- CONSTANT VALUE => DOC
--		0 as slen,
--		'?????' as patn,  -- sequence value in MASK  => If PRIMARY_SIGN = 1 THEN IGNORE >> LAST PATTERN of ?/* and insert sequence with 999999 as in LN [0-9]
--		ALP_MASK as incr,  -- REPLACE '..' with '-' and ***   must ignore small case (a-z) => CONFIRM with umesh/srini 
--		MIN_MASK, -- without CONSTANT
--		MAX_MASK, --      "
--		UPDATED_ON
--FROM ZZ_MASK
