--生产月度在制查询

EXEC P_ALTERPK 'PK_POM_PRODWIPLOG', 'T_POM_PRODWIPLOG', 'FID', '1';

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_POM_PRODOG_FBILLNO') CREATE INDEX IDX_POM_PRODOG_FBILLNO ON T_POM_PRODWIPLOG ( FBILLNO );
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_POM_PRODOG_FCREATETIME') CREATE INDEX IDX_POM_PRODOG_FCREATETIME ON T_POM_PRODWIPLOG ( FCREATETIME );

--生产月度在制查询_在制信息

EXEC P_ALTERPK 'PK_POM_PRODWIPLOGENTRY', 'T_POM_PRODWIPLOGENTRY', 'FENTRYID', '1';

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_POM_PRODRY_FID') CREATE INDEX IDX_POM_PRODRY_FID ON T_POM_PRODWIPLOGENTRY ( FID );
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_POM_PRODRY_FSEQ') CREATE INDEX IDX_POM_PRODRY_FSEQ ON T_POM_PRODWIPLOGENTRY ( FSEQ );
