
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_im_mdc_difsharelog' AND KSQL_COL_NAME ='fsharebillno') 
 ALTER TABLE t_im_mdc_difsharelog ADD (fsharebillno NVARCHAR(50) DEFAULT ' ' NOT NULL );
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_im_mdc_difsharelog' AND KSQL_COL_NAME ='fmftorg') 
 ALTER TABLE t_im_mdc_difsharelog ADD (fmftorg BIGINT DEFAULT 0 NOT NULL );
 
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_im_mdc_difsharelog' AND KSQL_COL_NAME ='fproducedept') 
 ALTER TABLE t_im_mdc_difsharelog ADD (fproducedept BIGINT DEFAULT 0 NOT NULL );

  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_im_mdc_difsharelog' AND KSQL_COL_NAME ='finvorg') 
 ALTER TABLE t_im_mdc_difsharelog ADD (finvorg BIGINT DEFAULT 0 NOT NULL );
 
   IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_im_mdc_difsharelog' AND KSQL_COL_NAME ='FINDATEEND') 
 ALTER TABLE t_im_mdc_difsharelog ADD (FINDATEEND DATETIME);

  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_im_mdc_difsharelog' AND KSQL_COL_NAME ='FINVDATE') 
 ALTER TABLE t_im_mdc_difsharelog ADD (FINVDATE DATETIME);
 



