--非例行工卡增加字段
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MROORDER_N' AND KSQL_COL_NAME ='FMULTITRADES') 
 ALTER TABLE T_POM_MROORDER_N ADD (FMULTITRADES CHAR(1) DEFAULT '0' NOT NULL);
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MROORDER_N' AND KSQL_COL_NAME ='FSINGLETRADE') 
 ALTER TABLE T_POM_MROORDER_N ADD (FSINGLETRADE CHAR(1) DEFAULT '1' NOT NULL);
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MROORDER_N' AND KSQL_COL_NAME ='FCARRIEDFORWARD') 
 ALTER TABLE T_POM_MROORDER_N ADD (FCARRIEDFORWARD CHAR(1) DEFAULT '0' NOT NULL);
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MROORDER_N' AND KSQL_COL_NAME ='FNOACTIONREQUIRED') 
 ALTER TABLE T_POM_MROORDER_N ADD (FNOACTIONREQUIRED CHAR(1) DEFAULT '0' NOT NULL);

 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MROORDER_N' AND KSQL_COL_NAME ='FSTAFRAME') 
 ALTER TABLE T_POM_MROORDER_N ADD (FSTAFRAME BIGINT DEFAULT 0 NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MROORDER_N' AND KSQL_COL_NAME ='FSTAFRAMEFROM') 
 ALTER TABLE T_POM_MROORDER_N ADD (FSTAFRAMEFROM NVARCHAR(512) DEFAULT ' ' NOT NULL);
 
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MROORDER_N' AND KSQL_COL_NAME ='FSTAFRAMETO') 
 ALTER TABLE T_POM_MROORDER_N ADD (FSTAFRAMETO NVARCHAR(512) DEFAULT ' ' NOT NULL);
 
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MROORDER_N' AND KSQL_COL_NAME ='FWATERLINE') 
 ALTER TABLE T_POM_MROORDER_N ADD (FWATERLINE BIGINT DEFAULT 0 NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MROORDER_N' AND KSQL_COL_NAME ='FWATERLINEFROM') 
 ALTER TABLE T_POM_MROORDER_N ADD (FWATERLINEFROM NVARCHAR(512) DEFAULT ' ' NOT NULL);
 
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MROORDER_N' AND KSQL_COL_NAME ='FWATERLINETO') 
 ALTER TABLE T_POM_MROORDER_N ADD (FWATERLINETO NVARCHAR(512) DEFAULT ' ' NOT NULL);
 
 
  
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MROORDER_N' AND KSQL_COL_NAME ='FSTRINGER') 
 ALTER TABLE T_POM_MROORDER_N ADD (FSTRINGER BIGINT DEFAULT 0 NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MROORDER_N' AND KSQL_COL_NAME ='FSTRINGERFROM') 
 ALTER TABLE T_POM_MROORDER_N ADD (FSTRINGERFROM NVARCHAR(512) DEFAULT ' ' NOT NULL);
 
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MROORDER_N' AND KSQL_COL_NAME ='FSTRINGERFROMVALUE') 
 ALTER TABLE T_POM_MROORDER_N ADD (FSTRINGERFROMVALUE NVARCHAR(512) DEFAULT ' ' NOT NULL);

 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MROORDER_N' AND KSQL_COL_NAME ='FSTRINGERTO') 
 ALTER TABLE T_POM_MROORDER_N ADD (FSTRINGERTO NVARCHAR(512) DEFAULT ' ' NOT NULL);
 
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MROORDER_N' AND KSQL_COL_NAME ='FSTRINGERTOVALUE') 
 ALTER TABLE T_POM_MROORDER_N ADD (FSTRINGERTOVALUE NVARCHAR(512) DEFAULT ' ' NOT NULL);
 
 
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MROORDER_N' AND KSQL_COL_NAME ='FBBL') 
 ALTER TABLE T_POM_MROORDER_N ADD (FBBL BIGINT DEFAULT 0 NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MROORDER_N' AND KSQL_COL_NAME ='FBBLFROM') 
 ALTER TABLE T_POM_MROORDER_N ADD (FBBLFROM NVARCHAR(512) DEFAULT ' ' NOT NULL);
 
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MROORDER_N' AND KSQL_COL_NAME ='FBBLFROMVALUE') 
 ALTER TABLE T_POM_MROORDER_N ADD (FBBLFROMVALUE NVARCHAR(512) DEFAULT ' ' NOT NULL);

 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MROORDER_N' AND KSQL_COL_NAME ='FBBLTO') 
 ALTER TABLE T_POM_MROORDER_N ADD (FBBLTO NVARCHAR(512) DEFAULT ' ' NOT NULL);
 
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MROORDER_N' AND KSQL_COL_NAME ='FBBLTOVALUE') 
 ALTER TABLE T_POM_MROORDER_N ADD (FBBLTOVALUE NVARCHAR(512) DEFAULT ' ' NOT NULL);