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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_INVOICE_VEHICLES_BILLNO') CREATE INDEX IDX_INVOICE_VEHICLES_BILLNO ON T_SIM_VATINVOICE_VEHICLES ( FORGID ,FBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_INVOICE_VEHICLES_CODE') CREATE  CLUSTERED INDEX IDX_INVOICE_VEHICLES_CODE ON T_SIM_VATINVOICE_VEHICLES ( FINVOICECODE ,FINVOICENO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_INVOICE_VEHICLES_ISSUETIME') CREATE INDEX IDX_INVOICE_VEHICLES_ISSUETIME ON T_SIM_VATINVOICE_VEHICLES ( FISSUETIME );



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