 
 EXEC P_ALTERPK 'PK_MSPLAN_VERSIONTYPE', 'T_MSPLAN_VERSIONTYPE', 'FID', '1';
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSPLAN_VERSIONTYPE_FNUM') CREATE INDEX IDX_MSPLAN_VERSIONTYPE_FNUM ON T_MSPLAN_VERSIONTYPE ( FNUMBER );
 
 EXEC P_ALTERPK 'PK_MSPLAN_VERSIONTYPE_L', 'T_MSPLAN_VERSIONTYPE_L', 'FPKID', '1';
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSPLAN_VERSIONTYPE_L') CREATE INDEX IDX_MSPLAN_VERSIONTYPE_L ON T_MSPLAN_VERSIONTYPE_L ( FID ,FLOCALEID );
 
 EXEC P_ALTERPK 'PK_MSPLAN_VERSION', 'T_MSPLAN_VERSION', 'FID', '1';
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSPLAN_VERSION_FNUM') CREATE INDEX IDX_MSPLAN_VERSION_FNUM ON T_MSPLAN_VERSION ( FNUMBER );
 
 EXEC P_ALTERPK 'PK_MSPLAN_VERSION_L', 'T_MSPLAN_VERSION_L', 'FPKID', '1';
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSPLAN_VERSION_L') CREATE INDEX IDX_MSPLAN_VERSION_L ON T_MSPLAN_VERSION_L ( FID ,FLOCALEID );