/*** 合同类型  合同源单类型**/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_CONTRACTBILL_S' AND KSQL_COL_NAME ='FSCMCTYPE')
ALTER TABLE T_ER_CONTRACTBILL_S ADD (FSCMCTYPE  BIGINT DEFAULT 0 NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_CONTRACTBILL_S' AND KSQL_COL_NAME ='FSBILLTYPE')
ALTER TABLE T_ER_CONTRACTBILL_S ADD (FSBILLTYPE CHAR(1) DEFAULT ' ' NOT NULL);



/**修改数据库字段长度  联系人、联系电话 */

 EXEC P_ALTERCOLUMN 'T_ER_CONTRACTPARTY', 'FCONTACTPERSON', 'NVARCHAR(100)', 'NOT NULL', '0100', ''' ''';

 EXEC P_ALTERCOLUMN 'T_ER_CONTRACTPARTY', 'FSIGNTEL', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

