EXEC P_ALTERPK 'PK_FMM_PRATIOENTRY', 'T_FMM_PRATIOENTRY', 'FENTRYID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_PRATIOENTRY_FSEQ') CREATE INDEX IDX_FMM_PRATIOENTRY_FSEQ ON T_FMM_PRATIOENTRY ( FID ,FSEQ );
	
EXEC P_ALTERPK 'PK_FMM_DISPATCHWKTP', 'T_FMM_DISPATCHWKTP', 'FID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_DISPATCHWKTP_FNUM') CREATE INDEX IDX_FMM_DISPATCHWKTP_FNUM ON T_FMM_DISPATCHWKTP ( FNUMBER );
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_DISPATCHWKTP_FCT') CREATE INDEX IDX_FMM_DISPATCHWKTP_FCT ON T_FMM_DISPATCHWKTP ( FCREATETIME );
	
EXEC P_ALTERPK 'PK_FMM_DISPATCHWKTP_L', 'T_FMM_DISPATCHWKTP_L', 'FPKID', '1';	
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_DISPATCHWKTP_L_FID') CREATE INDEX IDX_FMM_DISPATCHWKTP_L_FID ON T_FMM_DISPATCHWKTP_L ( FID ,FLOCALEID );
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_DISPATCHWKTP_L_FNA') CREATE INDEX IDX_FMM_DISPATCHWKTP_L_FNA ON T_FMM_DISPATCHWKTP_L ( FNAME );