
 EXEC P_ALTERPK 'PK_PMBD_CALENDAR', 'T_PMBD_CALENDAR', 'FID', '1';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMBD_CALEAR_FNUMBER') CREATE INDEX IDX_PMBD_CALEAR_FNUMBER ON T_PMBD_CALENDAR ( FNUMBER );
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMBD_CALEAR_FCREATETIME') CREATE INDEX IDX_PMBD_CALEAR_FCREATETIME ON T_PMBD_CALENDAR ( FCREATETIME );
 
 EXEC P_ALTERPK 'PK_PMBD_CALENDAR_L', 'T_PMBD_CALENDAR_L', 'FPKID', '1';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMBD_CALEARL_FID') CREATE INDEX IDX_PMBD_CALEARL_FID ON T_PMBD_CALENDAR_L ( FID,FLOCALEID );
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMBD_CALEARL_FNAME') CREATE INDEX IDX_PMBD_CALEARL_FNAME ON T_PMBD_CALENDAR_L ( FNAME );
 
 EXEC P_ALTERPK 'PK_PMBD_HALFWORKTIME', 'T_PMBD_HALFWORKTIME', 'FENTRYID', '1';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMBD_HALFME_FID') CREATE INDEX IDX_PMBD_HALFME_FID ON T_PMBD_HALFWORKTIME ( FID );
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMBD_HALFME_FSEQ') CREATE INDEX IDX_PMBD_HALFME_FSEQ ON T_PMBD_HALFWORKTIME ( FSEQ );
 
 EXEC P_ALTERPK 'PK_PMBD_WORKTIME', 'T_PMBD_WORKTIME', 'FENTRYID', '1';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMBD_WORKME_FID') CREATE INDEX IDX_PMBD_WORKME_FID ON T_PMBD_WORKTIME ( FID );
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMBD_WORKME_FSEQ') CREATE INDEX IDX_PMBD_WORKME_FSEQ ON T_PMBD_WORKTIME ( FSEQ );


