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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SIM_BILL_TRANS') CREATE  CLUSTERED INDEX IDX_SIM_BILL_TRANS ON T_SIM_BILL_TRANS ( FCONFIRMBILLNO );


 EXEC P_ALTERPK 'PK_SIM_BILL_TRANS_ITEM', 'T_SIM_BILL_TRANS_ITEM', 'FENTRYID', '0';

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


 EXEC P_ALTERPK 'PK_SIM_BILL_TRANS_RELAX', 'T_SIM_BILL_TRANS_RELAX', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SIM_BILL_TRANS_RELAX') CREATE  CLUSTERED INDEX IDX_SIM_BILL_TRANS_RELAX ON T_SIM_BILL_TRANS_RELAX ( FCONFIRMBILLID );


 EXEC P_ALTERPK 'PK_SIM_CONFIRM_BILL', 'T_SIM_CONFIRM_BILL', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SIM_CONFIRM_BILL') CREATE  CLUSTERED INDEX IDX_SIM_CONFIRM_BILL ON T_SIM_CONFIRM_BILL ( FCONFIRMBILLNO );


 EXEC P_ALTERPK 'PK_SIM_CONFIRM_BILL_ITEM', 'T_SIM_CONFIRM_BILL_ITEM', 'FENTRYID', '0';

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


 EXEC P_ALTERPK 'PK_SIM_ORIGINAL_BILL', 'T_SIM_ORIGINAL_BILL', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SIM_ORIGINAL_BILL') CREATE  CLUSTERED INDEX IDX_SIM_ORIGINAL_BILL ON T_SIM_ORIGINAL_BILL ( FBILLNO );


 EXEC P_ALTERPK 'PK_SIM_ORIGINAL_BILL_ITEM', 'T_SIM_ORIGINAL_BILL_ITEM', 'FENTRYID', '0';

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



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