IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BD_ATTACH_VERSION') 
 CREATE TABLE T_BD_ATTACH_VERSION (
FID BIGINT DEFAULT 0 NOT NULL,
FATTACHID VARCHAR(50) DEFAULT ' ' NOT NULL,
FVERSION INT DEFAULT 0 NOT NULL,
FEDITTYPE VARCHAR(10) DEFAULT ' ' NOT NULL
);


EXEC p_AlterColumn 'T_WARN_SCHEDULE_L', 'FNAME', 'NVARCHAR(300)', 'NOT NULL', '0100', ''' ''';
