
 EXEC P_ALTERPK 'PK_PMTS_WBS', 'T_PMTS_WBS', 'FID', '1';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_WBS_FNUMBER') CREATE INDEX IDX_PMTS_WBS_FNUMBER ON T_PMTS_WBS ( FNUMBER );
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_WBS_FCREATETIME') CREATE INDEX IDX_PMTS_WBS_FCREATETIME ON T_PMTS_WBS ( FCREATETIME );
 
 EXEC P_ALTERPK 'PK_PMTS_WBS_L', 'T_PMTS_WBS_L', 'FPKID', '1';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_WBSL_FID') CREATE INDEX IDX_PMTS_WBSL_FID ON T_PMTS_WBS_L ( FID,FLOCALEID );
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_WBSL_FNAME') CREATE INDEX IDX_PMTS_WBSL_FNAME ON T_PMTS_WBS_L ( FNAME );
 

 EXEC P_ALTERPK 'PK_PMTS_ORGPROSENTRY', 'T_PMTS_ORGPROSENTRY', 'FENTRYID', '1';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_ORGPRY_FID') CREATE INDEX IDX_PMTS_ORGPRY_FID ON T_PMTS_ORGPROSENTRY ( FID );
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_ORGPRY_FSEQ') CREATE INDEX IDX_PMTS_ORGPRY_FSEQ ON T_PMTS_ORGPROSENTRY ( FSEQ );
 



