IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SVC_PRINTRESULT' AND KSQL_COL_NAME ='FTASKNAME')
 ALTER TABLE T_SVC_PRINTRESULT ADD (FTASKNAME VARCHAR(256) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SVC_PRINTRESULT' AND KSQL_COL_NAME ='FEXPTYPE')
 ALTER TABLE T_SVC_PRINTRESULT ADD (FEXPTYPE VARCHAR(20) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SVC_PRINTRESULT' AND KSQL_COL_NAME ='FSERVICEN')
 ALTER TABLE T_SVC_PRINTRESULT ADD (FSERVICEN VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SVC_PRINTRESULT' AND KSQL_COL_NAME ='FPRINTER')
 ALTER TABLE T_SVC_PRINTRESULT ADD (FPRINTER VARCHAR(256) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SVC_PRINTRESULT' AND KSQL_COL_NAME ='FSTATUS')
 ALTER TABLE T_SVC_PRINTRESULT ADD (FSTATUS CHAR(1) DEFAULT 'A' NOT NULL );


 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SVC_PRINTRESULT_SERVICEN') CREATE INDEX IDX_SVC_PRINTRESULT_SERVICEN ON T_SVC_PRINTRESULT ( FSERVICEN );