/**Begin D:\PDM_UPGRADE\PDM1\FCS_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_FCS_SCHEDULEPROP', 'T_FCS_SCHEDULEPROP', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_FCS_SCHEDULEPROP_L', 'T_FCS_SCHEDULEPROP_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_FCS_SCHEDULE_ORG', 'T_FCS_SCHEDULE_ORG', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_FCS_SCHETASKENTRY', 'T_FCS_SCHETASKENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_FCS_SCHETASKENTRY_L', 'T_FCS_SCHETASKENTRY_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_FCS_SCHETASKENTRY_L1') CREATE INDEX IDX_T_FCS_SCHETASKENTRY_L1 ON T_FCS_SCHETASKENTRY_L ( FENTRYID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_FCS_SCHEDULEPARAM', 'T_FCS_SCHEDULEPARAM', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_FCS_SCHEDULEPARAM_L', 'T_FCS_SCHEDULEPARAM_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_FCS_SCHPARAMENTRY', 'T_FCS_SCHPARAMENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_FCS_SCHPARAMENTRY_L', 'T_FCS_SCHPARAMENTRY_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_FCS_SCHPARAMENTRY_L') CREATE INDEX IDX_T_FCS_SCHPARAMENTRY_L ON T_FCS_SCHPARAMENTRY_L ( FENTRYID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_FCS_SCHEDULE_LOG', 'T_FCS_SCHEDULE_LOG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_FCS_SCHEDULE_LOG1') CREATE INDEX IDX_T_FCS_SCHEDULE_LOG1 ON T_FCS_SCHEDULE_LOG ( FBILLNO );


 EXEC P_ALTERPK 'PK_FCS_SCHEDULE_LOG_ENTRY', 'T_FCS_SCHEDULE_LOG_ENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_FCS_SCHEDULE_LOG_ENTRY_L', 'T_FCS_SCHEDULE_LOG_ENTRY_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FCS_SCHE_LOG_ENTRY_L1') CREATE INDEX IDX_FCS_SCHE_LOG_ENTRY_L1 ON T_FCS_SCHEDULE_LOG_ENTRY_L ( FENTRYID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_FCS_SCHEDULEDETAIL_LOG', 'T_FCS_SCHEDULEDETAIL_LOG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_FCS_SCHEDULEDETAIL_LOG1') CREATE INDEX IDX_T_FCS_SCHEDULEDETAIL_LOG1 ON T_FCS_SCHEDULEDETAIL_LOG ( FBILLNO );


 EXEC P_ALTERPK 'PK_FCS_SCHEDULEOPERSUM_LOG', 'T_FCS_SCHEDULEOPERSUM_LOG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_FCS_SCHEDULEOPERSUM_LOG1') CREATE INDEX IDX_T_FCS_SCHEDULEOPERSUM_LOG1 ON T_FCS_SCHEDULEOPERSUM_LOG ( FSCHEDULEID );



/**End D:\PDM_UPGRADE\PDM1\FCS_constraint.sql **/
