/**Begin D:\pdm\PDM_UPGRADE_1.1\PDM_UPGRADE\pdm1\SIM_constraint.sql **/
 EXEC P_ALTERPK 'PK_SIM_BILL_CENTER_CATEGOR', 'T_SIM_BILL_CENTER_CATEGOR', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SIM_BILL_CATEGOR_NUMBER') CREATE  CLUSTERED INDEX IDX_SIM_BILL_CATEGOR_NUMBER ON T_SIM_BILL_CENTER_CATEGOR ( FNUMBER );


 EXEC P_ALTERPK 'PK_SIM_BILL_CENTER_CATEGOR_L', 'T_SIM_BILL_CENTER_CATEGOR_L', 'FPKID', '0';

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


 EXEC P_ALTERPK 'PK_SIM_CATEGORY_ITEM', 'T_SIM_CATEGORY_ITEM', 'FENTRYID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SIM_CATEGORY_ITEM_CODE') CREATE INDEX IDX_SIM_CATEGORY_ITEM_CODE ON T_SIM_CATEGORY_ITEM ( FMERGECODE );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SIM_CATEGORY_ITEM_FK') CREATE  CLUSTERED INDEX IDX_SIM_CATEGORY_ITEM_FK ON T_SIM_CATEGORY_ITEM ( FID );



/**End D:\pdm\PDM_UPGRADE_1.1\PDM_UPGRADE\pdm1\SIM_constraint.sql **/
