IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_APPROVELNOTE' AND KSQL_COL_NAME ='FRPTENTITYID') 
 ALTER TABLE T_EB_APPROVELNOTE ADD (FRPTENTITYID BIGINT DEFAULT 0 NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_APPROVEBILL' AND KSQL_COL_NAME ='FRPTPROCESSTYPE') 
 ALTER TABLE T_EB_APPROVEBILL ADD (FRPTPROCESSTYPE CHAR(1) DEFAULT '1' NOT NULL );
 
  EXEC p_AlterColumn 'T_EB_INTEGRATION_MAPVAL', 'FSOURCENAME', 'NVARCHAR(200)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_EB_INTEGRATION_MAPVAL', 'FAIMNAME', 'NVARCHAR(200)', 'NOT NULL', '0100', ''' ''';
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_TEMPLATEORG') 
 CREATE TABLE T_EB_TEMPLATEORG (
FID BIGINT DEFAULT 0 NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FORGRANGE CHAR(5) DEFAULT '10' NOT NULL,
FALLOCATERID BIGINT DEFAULT 0 NOT NULL,
FALLOCATETIME DATETIME,
FSCHEMEID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_RPTSCHEME') 
 CREATE TABLE T_EB_RPTSCHEME (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBIZRANGEID BIGINT DEFAULT 0 NOT NULL,
FSTATUS CHAR(1) DEFAULT '1' NOT NULL,
FCREATERID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FCREATEDATE DATETIME,
FMODIFYDATE DATETIME,
FSEQ INT DEFAULT 0 NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL
);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_RPTSCHEME_L') 
 CREATE TABLE T_EB_RPTSCHEME_L (
FPKID NVARCHAR(20) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FDESCRIPTION NVARCHAR(2000) DEFAULT ' ' NOT NULL
);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_SCHEMEASSIGN') 
 CREATE TABLE T_EB_SCHEMEASSIGN (
FID BIGINT DEFAULT 0 NOT NULL,
FSCHEMEID BIGINT DEFAULT 0 NOT NULL,
FYEARID BIGINT DEFAULT 0 NOT NULL,
FDATATYPEID BIGINT DEFAULT 0 NOT NULL,
FVERSIONID BIGINT DEFAULT 0 NOT NULL,
FMODIFIER BIGINT DEFAULT 0 NOT NULL,
FMODIFYDATE DATETIME,
FSEQ INT DEFAULT 0 NOT NULL,
FBIZRANGEID BIGINT DEFAULT 0 NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL
);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_TEMPLATEUSER') 
 CREATE TABLE T_EB_TEMPLATEUSER (
FID BIGINT DEFAULT 0 NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FUSERID NVARCHAR(50) DEFAULT '0' NOT NULL,
FPERMISSIONFLAG CHAR(1) DEFAULT '1' NOT NULL,
FCREATETIME DATETIME,
FCREATOR BIGINT DEFAULT 0 NOT NULL,
FMODIFYDATE DATETIME,
FMODIFIER BIGINT DEFAULT 0 NOT NULL,
FUSERTYPE NVARCHAR(30) DEFAULT ' ' NOT NULL
);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_DYNAMICREPORT' AND KSQL_COL_NAME ='FSCHEMEASSIGNID') 
 ALTER TABLE T_EB_DYNAMICREPORT ADD (FSCHEMEASSIGNID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_REPORTATTACHMENT' AND KSQL_COL_NAME ='FRPTENTITYID') 
 ALTER TABLE T_EB_REPORTATTACHMENT ADD (FRPTENTITYID BIGINT DEFAULT 0 NOT NULL );
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_CENTRALAPPADJENTITY') 
 CREATE TABLE T_EB_CENTRALAPPADJENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FREPORTBILLNO VARCHAR(60) DEFAULT ' ' NOT NULL,
FTEMPLATE BIGINT DEFAULT 0 NOT NULL,
FDIM1 VARCHAR(60) DEFAULT ' ' NOT NULL,
FDIM2 VARCHAR(60) DEFAULT ' ' NOT NULL,
FDIM3 VARCHAR(60) DEFAULT ' ' NOT NULL,
FDIM4 VARCHAR(60) DEFAULT ' ' NOT NULL,
FDIMRANGE NCLOB,
FADJUSTREPORT1 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FADJUSTREPORT2 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FADJUSTREPORT3 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FADJUSTREPORT4 DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSUGGESTION NVARCHAR(150) DEFAULT ' ' NOT NULL,
FAPPROVER BIGINT DEFAULT 0 NOT NULL,
FAPPROVEDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_CENTRALAPPADJRECORD') 
 CREATE TABLE T_EB_CENTRALAPPADJRECORD (
FID BIGINT DEFAULT 0 NOT NULL,
FAPPROVEBILLNO VARCHAR(60) DEFAULT ' ' NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_CENTRALAPPPLAN') 
 CREATE TABLE T_EB_CENTRALAPPPLAN (
FID BIGINT DEFAULT 0 NOT NULL,
FMODEL BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(80) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(160) DEFAULT ' ' NOT NULL,
FBUSIRANG BIGINT DEFAULT 0 NOT NULL,
FISAPPDETAIL CHAR(1) DEFAULT '0' NOT NULL,
FAPPRELATYPE VARCHAR(10) DEFAULT ' ' NOT NULL,
FBAPPRELA VARCHAR(10) DEFAULT ' ' NOT NULL,
FEFFECTSTATUS CHAR(1) DEFAULT '0' NOT NULL,
FEXPLAIN NCLOB,
FCREATER BIGINT DEFAULT 0 NOT NULL,
FCREATEDATE DATETIME,
FMODIFIER BIGINT DEFAULT 0 NOT NULL,
FMODIFYDATE DATETIME,
FAPPTEMPLATE NCLOB,
FBEFOREAPPTEMPLATETYPE VARCHAR(5) DEFAULT ' ' NOT NULL,
FAPPTEMPLATETYPE VARCHAR(5) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_CENTRALAPPPLAN_RELAT') 
 CREATE TABLE T_EB_CENTRALAPPPLAN_RELAT (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_CENTRALAPPPLAN_TYPE') 
 CREATE TABLE T_EB_CENTRALAPPPLAN_TYPE (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_CENTRALAPPPLANBILL') 
 CREATE TABLE T_EB_CENTRALAPPPLANBILL (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_CENTRALAPPPLANENTITY') 
 CREATE TABLE T_EB_CENTRALAPPPLANENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FBILLTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FREPORTTEMPLATEID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_CENTRALAPPPLANREPORT') 
 CREATE TABLE T_EB_CENTRALAPPPLANREPORT (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_CENTRALAPPRECENTITY') 
 CREATE TABLE T_EB_CENTRALAPPRECENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FCENTRALAPPTYPE BIGINT DEFAULT 0 NOT NULL,
FENTITY BIGINT DEFAULT 0 NOT NULL,
FAPPROVER BIGINT DEFAULT 0 NOT NULL,
FORDER NVARCHAR(20) DEFAULT ' ' NOT NULL,
FSTATUS NVARCHAR(20) DEFAULT ' ' NOT NULL,
FAPPROVEDATE DATETIME,
FSUGGESTION NVARCHAR(500) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_CENTRALAPPRECORD') 
 CREATE TABLE T_EB_CENTRALAPPRECORD (
FID BIGINT DEFAULT 0 NOT NULL,
FAPPROVEBILLNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_CENTRALAPPREL') 
 CREATE TABLE T_EB_CENTRALAPPREL (
FID BIGINT DEFAULT 0 NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FVIEWID NVARCHAR(100) DEFAULT ' ' NOT NULL,
FNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FCENTRALENTITYORG NCLOB,
FCENTRALENTITYSUMMARY BIGINT DEFAULT 0 NOT NULL,
FCENTRALAPPENTITY BIGINT DEFAULT 0 NOT NULL,
FEFFECTSTATUS CHAR(1) DEFAULT '0' NOT NULL,
FCREATER BIGINT DEFAULT 0 NOT NULL,
FMODIFIER BIGINT DEFAULT 0 NOT NULL,
FCREATEDATE DATETIME,
FMODIFYDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_CENTRALAPPREL_USER') 
 CREATE TABLE T_EB_CENTRALAPPREL_USER (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_CENTRALAPPTYPE') 
 CREATE TABLE T_EB_CENTRALAPPTYPE (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FEFFECTSTATUS CHAR(1) DEFAULT '0' NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FCREATERFIELD BIGINT DEFAULT 0 NOT NULL,
FMODIFIERFIELD BIGINT DEFAULT 0 NOT NULL,
FCREATEDATEFIELD DATETIME,
FMODIFYDATEFIELD DATETIME,
FBILLSTATUS VARCHAR(10) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_STRUCTOFACCOUNT' AND KSQL_COL_NAME ='FAPPROVALTYPE') 
 ALTER TABLE T_EB_STRUCTOFACCOUNT ADD (FAPPROVALTYPE BIGINT DEFAULT 0 NOT NULL );
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_DATAENTITYPERIODMAP' AND KSQL_COL_NAME ='FFISCALYEAR') 
 ALTER TABLE T_EB_DATAENTITYPERIODMAP ADD (FFISCALYEAR BIGINT DEFAULT 0 NOT NULL );
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_BGDECOMPOSE') 
 CREATE TABLE T_EB_BGDECOMPOSE (
FID BIGINT DEFAULT 0 NOT NULL,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FBILLNUMBER NVARCHAR(100) DEFAULT ' ' NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FBGAPPLYSCHEME BIGINT DEFAULT 0 NOT NULL,
FYEAR BIGINT DEFAULT 0 NOT NULL,
FMONEYUNIT NVARCHAR(30) DEFAULT ' ' NOT NULL,
FORG BIGINT DEFAULT 0 NOT NULL,
FDECOMPOSEPERSON BIGINT DEFAULT 0 NOT NULL,
FBILLTYPE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FVERSION BIGINT DEFAULT 0 NOT NULL,
FDATATYPE BIGINT DEFAULT 0 NOT NULL,
FSOURCEBILLID NVARCHAR(100) DEFAULT ' ' NOT NULL,
FDECOMPOSESCHEME BIGINT DEFAULT 0 NOT NULL,
FREMARK NVARCHAR(255) DEFAULT ' ',
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FAUDITDATE DATETIME,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FAUDITOR BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_DECOMPOSESCHEME') 
 CREATE TABLE T_EB_DECOMPOSESCHEME (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT 'A' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT '1' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FRELEASEORGID BIGINT DEFAULT 0 NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_DECOMPOSESCHEME_L') 
 CREATE TABLE T_EB_DECOMPOSESCHEME_L (
FPKID NVARCHAR(255) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID NVARCHAR(255) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FEXPLAIN NVARCHAR(500) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_DECOMSCHEME_ENTRY') 
 CREATE TABLE T_EB_DECOMSCHEME_ENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FDECOMPOSEORGID BIGINT DEFAULT 0 NOT NULL,
FDECOMPOSEPERSONID BIGINT DEFAULT 0 NOT NULL
);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_ADAPTSCOPE') 
 CREATE TABLE T_EB_ADAPTSCOPE (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FDIMENSIONID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_FIXEDVALUE') 
 CREATE TABLE T_EB_FIXEDVALUE (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FBIZMODEL BIGINT DEFAULT 0 NOT NULL,
FFIXEDTYPE CHAR(1) DEFAULT '1' NOT NULL,
FACCOUNTJSON NCLOB,
FSEQ INT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATEDATE DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_FIXEDVALUESETTING') 
 CREATE TABLE T_EB_FIXEDVALUESETTING (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FORGJSON NCLOB,
FDIMJSON1 NCLOB,
FDIMJSON2 NCLOB,
FDIMJSON3 NCLOB,
FDIMJSON4 NCLOB,
FDIMJSON5 NCLOB,
FDIMJSON6 NCLOB,
FDIMJSON7 NCLOB,
FDIMJSON8 NCLOB,
FDIMJSON9 NCLOB,
FFIXEDVALUE DECIMAL(19,6) DEFAULT 0 NOT NULL
);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_INTEGRATION_QUERY' AND KSQL_COL_NAME ='FNUMBER') 
 ALTER TABLE T_EB_INTEGRATION_QUERY ADD (FNUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_INTEGRATION_QUERY' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_EB_INTEGRATION_QUERY ADD (FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_INTEGRATION_QUERY' AND KSQL_COL_NAME ='FMODIFIERFIELD') 
 ALTER TABLE T_EB_INTEGRATION_QUERY ADD (FMODIFIERFIELD BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_INTEGRATION_QUERY' AND KSQL_COL_NAME ='FDEFAULTSHOWSTATUS') 
 ALTER TABLE T_EB_INTEGRATION_QUERY ADD (FDEFAULTSHOWSTATUS CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_INTEGRATION_QUERY' AND KSQL_COL_NAME ='FSCHEDULESTATUS') 
 ALTER TABLE T_EB_INTEGRATION_QUERY ADD (FSCHEDULESTATUS CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_INTEGRATION_QUERY' AND KSQL_COL_NAME ='FDATASETID') 
 ALTER TABLE T_EB_INTEGRATION_QUERY ADD (FDATASETID BIGINT DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_EBTEMPLATE' AND KSQL_COL_NAME ='FBEGINTIME') 
 ALTER TABLE T_EB_EBTEMPLATE ADD (FBEGINTIME NVARCHAR(100) DEFAULT ' ' NOT NULL );
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_EBTEMPLATE' AND KSQL_COL_NAME ='FENDTIME') 
 ALTER TABLE T_EB_EBTEMPLATE ADD (FENDTIME NVARCHAR(100) DEFAULT ' ' NOT NULL );
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_EBDIMMEMBERMAP' AND KSQL_COL_NAME ='FBUSSMODELID') 
 ALTER TABLE T_EB_EBDIMMEMBERMAP ADD (FBUSSMODELID BIGINT DEFAULT 0 NOT NULL );