
EXEC P_ALTERPK 'PK_FMM_PERSONFACTOR', 'T_FMM_PERSONFACTOR', 'FID', '1';

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


EXEC P_ALTERPK 'PK_FMM_PERSONFACTOR_L', 'T_FMM_PERSONFACTOR_L', 'FPKID', '1';

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

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


EXEC P_ALTERPK 'PK_FMM_PERFACTORENTRY', 'T_FMM_PERFACTORENTRY', 'FENTRYID', '1';

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_PERFACTORENTRY_FSEQ') CREATE INDEX IDX_FMM_PERFACTORENTRY_FSEQ ON T_FMM_PERFACTORENTRY ( FID,FSEQ );