 EXEC P_ALTERPK 'PK_T_PMTS_TASK', 'T_PMTS_TASK', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_TASK_FNUMBER') CREATE INDEX IDX_PMTS_TASK_FNUMBER ON T_PMTS_TASK ( FNUMBER );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_TASK_FCREATETIME') CREATE INDEX IDX_PMTS_TASK_FCREATETIME ON T_PMTS_TASK ( FCREATETIME );
 
 
  EXEC P_ALTERPK 'PK_PMTS_TASK_L', 'T_PMTS_TASK_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_TASKL_FID') CREATE INDEX IDX_PMTS_TASKL_FID ON T_PMTS_TASK_L ( FID ,FLOCALEID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_TASKL_FNAME') CREATE INDEX IDX_PMTS_TASKL_FNAME ON T_PMTS_TASK_L ( FNAME );
 
 
  EXEC P_ALTERPK 'PK_PMTS_TASK_STOPENTRY', 'T_PMTS_TASK_STOPENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_TASK_FID') CREATE INDEX IDX_PMTS_TASK_FID ON T_PMTS_TASK_STOPENTRY ( FID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_TASK_FSEQ') CREATE INDEX IDX_PMTS_TASK_FSEQ ON T_PMTS_TASK_STOPENTRY ( FSEQ );
 
 
  EXEC P_ALTERPK 'PK_PMTS_POST_TASK', 'T_PMTS_POST_TASK', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_POSTPOSITION_TASK_FID') CREATE INDEX IDX_POSTPOSITION_TASK_FID ON T_PMTS_POST_TASK ( FID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_POSTPOSITION_TASK_FSEQ') CREATE INDEX IDX_POSTPOSITION_TASK_FSEQ ON T_PMTS_POST_TASK ( FSEQ );
 
 
  EXEC P_ALTERPK 'PK_PMTS_PRE_TASK', 'T_PMTS_PRE_TASK', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PREPOSITION_TASK_FID') CREATE INDEX IDX_PREPOSITION_TASK_FID ON T_PMTS_PRE_TASK ( FID );
 
 
  EXEC P_ALTERPK 'PK_PMTS_DOCUMENTENTRY', 'T_PMTS_DOCUMENTENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_DOCURY_FID') CREATE INDEX IDX_PMTS_DOCURY_FID ON T_PMTS_DOCUMENTENTRY ( FID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_DOCURY_FSEQ') CREATE INDEX IDX_PMTS_DOCURY_FSEQ ON T_PMTS_DOCUMENTENTRY ( FSEQ );
 
 
  EXEC P_ALTERPK 'PK_PMTS_FLOATPATHENTRY', 'T_PMTS_FLOATPATHENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_FLOARY_FID') CREATE INDEX IDX_PMTS_FLOARY_FID ON T_PMTS_FLOATPATHENTRY ( FID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_FLOARY_FSEQ') CREATE INDEX IDX_PMTS_FLOARY_FSEQ ON T_PMTS_FLOATPATHENTRY ( FSEQ );
 
 
  EXEC P_ALTERPK 'PK_PMTS_TASK_HS', 'T_PMTS_TASK_HS', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_TASKHS_FID') CREATE INDEX IDX_PMTS_TASKHS_FID ON T_PMTS_TASK_HS ( FID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_TASKHS_FSEQ') CREATE INDEX IDX_PMTS_TASKHS_FSEQ ON T_PMTS_TASK_HS ( FSEQ );
 
 
  EXEC P_ALTERPK 'PK_PMTS_TASK_CODE', 'T_PMTS_TASK_CODE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_TASKC_FNUMBER') CREATE INDEX IDX_PMTS_TASKC_FNUMBER ON T_PMTS_TASK_CODE ( FNUMBER );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_TASKC_FCREATETIME') CREATE INDEX IDX_PMTS_TASKC_FCREATETIME ON T_PMTS_TASK_CODE ( FCREATETIME );
 
 
 
 EXEC P_ALTERPK 'PK_PMTS_TASK_CODE_L', 'T_PMTS_TASK_CODE_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_TASKCL_FID') CREATE INDEX IDX_PMTS_TASKCL_FID ON T_PMTS_TASK_CODE_L ( FID ,FLOCALEID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_TASKCL_FNAME') CREATE INDEX IDX_PMTS_TASKCL_FNAME ON T_PMTS_TASK_CODE_L ( FNAME );

