/**Begin D:\PDM_UPGRADE_1.3\PDM_UPGRADE\pdm1\RIM_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_RIM_LEQI_PURPOSE', 'T_RIM_LEQI_PURPOSE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_LEQI_PURPOSE_ORG') CREATE INDEX IDX_RIM_LEQI_PURPOSE_ORG ON T_RIM_LEQI_PURPOSE ( FORG_ID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_PURPOSE_CREATETIME') CREATE INDEX IDX_RIM_PURPOSE_CREATETIME ON T_RIM_LEQI_PURPOSE ( FCREATETIME );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_LEQI_PURPOSE_NO') CREATE INDEX IDX_RIM_LEQI_PURPOSE_NO ON T_RIM_LEQI_PURPOSE ( FINVOICE_NO );



/**End D:\PDM_UPGRADE_1.3\PDM_UPGRADE\pdm1\RIM_constraint.sql **/
