 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_BD_CUSTOMER' AND KSQL_INDNAME = 'IDX_T_BD_CUSTOMER_INCOMPANY')
 CREATE INDEX IDX_T_BD_CUSTOMER_INCOMPANY ON T_BD_CUSTOMER (FINTERNALCOMPANYID );
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_BD_SUPPLIER' AND KSQL_INDNAME = 'IDX_T_BD_SUPPLIER_INCOMPANY')
 CREATE INDEX IDX_T_BD_SUPPLIER_INCOMPANY ON T_BD_SUPPLIER (FINTERNALCOMPANYID ); 