/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\AR_table.sql **/
 EXEC p_AlterColumn 'T_AR_BUSVERIFYRECORD', 'FHEADWFINFO', 'NVARCHAR(255)', 'NOT NULL', '1111', ''' ''';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_BUSVERIFYRECORD' AND KSQL_COL_NAME ='FHEADWFINFO_TAG') 
 ALTER TABLE T_AR_BUSVERIFYRECORD ADD (FHEADWFINFO_TAG NCLOB );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_BUSVERIFYRECORDENTRY' AND KSQL_COL_NAME ='FMAINWFINFO') 
 ALTER TABLE T_AR_BUSVERIFYRECORDENTRY ADD (FMAINWFINFO NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_BUSVERIFYRECORDENTRY' AND KSQL_COL_NAME ='FMAINWFINFO_TAG') 
 ALTER TABLE T_AR_BUSVERIFYRECORDENTRY ADD (FMAINWFINFO_TAG NCLOB );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_BUSVERIFYRECORDENTRY' AND KSQL_COL_NAME ='FASSWFINFO') 
 ALTER TABLE T_AR_BUSVERIFYRECORDENTRY ADD (FASSWFINFO NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_BUSVERIFYRECORDENTRY' AND KSQL_COL_NAME ='FASSWFINFO_TAG') 
 ALTER TABLE T_AR_BUSVERIFYRECORDENTRY ADD (FASSWFINFO_TAG NCLOB );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_INVOICEENTRY' AND KSQL_COL_NAME ='FCONBILLENTITY') 
 ALTER TABLE T_AR_INVOICEENTRY ADD (FCONBILLENTITY VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_INVOICEENTRY' AND KSQL_COL_NAME ='FCONBILLNUMBER') 
 ALTER TABLE T_AR_INVOICEENTRY ADD (FCONBILLNUMBER VARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_INVOICEENTRY' AND KSQL_COL_NAME ='FCONBILLROWNUM') 
 ALTER TABLE T_AR_INVOICEENTRY ADD (FCONBILLROWNUM VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_INVOICEENTRY' AND KSQL_COL_NAME ='FCONBILLID') 
 ALTER TABLE T_AR_INVOICEENTRY ADD (FCONBILLID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_INVOICEENTRY' AND KSQL_COL_NAME ='FCONBILLENTRYID') 
 ALTER TABLE T_AR_INVOICEENTRY ADD (FCONBILLENTRYID BIGINT DEFAULT 0 NOT NULL );

/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\AR_table.sql **/
