
/*------ ATD 440196 ------*/
IF EXISTS (
    SELECT 1 
    FROM INFORMATION_SCHEMA.COLUMNS 
    WHERE TABLE_NAME = 'PEDICLICOMPLEMENTO' 
    AND COLUMN_NAME = 'NumeroComanda'
    AND DATA_TYPE = 'char'
    AND CHARACTER_MAXIMUM_LENGTH = 5
)
BEGIN
    ALTER TABLE PEDICLICOMPLEMENTO
    ALTER COLUMN NumeroComanda CHAR(12)
END