![]() |
ADO Recordest.Filter "NOT LIKE"
Dear colleagues,
Is there any way to filter ADO Recordest using criteria "[SomeColumn] NOT LIKE 'SomeExpresion'". I don't mean "NOT LIKE" criteria within SQL statement used in Recordset.Open(that's work correctly), but in context Recordset.Filter = "[SomeColumn] NOT LIKE 'SomeExpresion'". Wider context: I need to obtain the index(-es) - row position value(-s) of row(-s) within some data table, which satisfy some multiple column criteria, including also "NOT LIKE" criteria. The data source table is located in Excel Worksheet, and it doesn't contain "Primary Key" - index column(row unique identifyer). I will appreciate any help regarding this issue. Thank You in advance. Regards. Mirom. |
ADO Recordest.Filter "NOT LIKE"
Unfortunately (at least according to the ADO documentation) you cannot use a
Not operator in a Recordset Filter. I assume you have tried this and found it does not work (thus the reason for your post). It is a shame, since it would indeed be useful and it is mystifying to me why it was not implemented. There may be ways to use other filter clauses to get the results you want but that would depend on the specific pattern of characters you are trying to check against. -- - K Dales " wrote: Dear colleagues, Is there any way to filter ADO Recordest using criteria "[SomeColumn] NOT LIKE 'SomeExpresion'". I don't mean "NOT LIKE" criteria within SQL statement used in Recordset.Open(that's work correctly), but in context Recordset.Filter = "[SomeColumn] NOT LIKE 'SomeExpresion'". Wider context: I need to obtain the index(-es) - row position value(-s) of row(-s) within some data table, which satisfy some multiple column criteria, including also "NOT LIKE" criteria. The data source table is located in Excel Worksheet, and it doesn't contain "Primary Key" - index column(row unique identifyer). I will appreciate any help regarding this issue. Thank You in advance. Regards. Mirom. |
ADO Recordest.Filter "NOT LIKE"
Thank You very much for kind answer. Regards. Mirom.
|
All times are GMT +1. The time now is 02:45 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com