Inverting queries (NOT?)

User 169b52bbd8

04-06-2008 05:36:47

Dear All,





Yet another question.





Is there a way to invert a query? I can do a search which usefully selects the entries I do not want, but can not find an easy way to invert it using the query builder.





Regards





David

ChemAxon fa971619eb

04-06-2008 13:56:26

David,





We don't have and option to directly invert the meaning of a query.





Most (all?) query operators have opposite equivalents (e.g equals and not equals, is null and is not null) so you can usually invert the meaning of any particular term. But of course for complex expressions its not so simple to define a complete query that is the inverse, so this is only really a solution for the simplest of queries.





List management might also be an answer in some cases, but lists are designed to be relatively small (a few thousand IDs). If the number of rows is not too large then this can be a viable option - create a list with all rows (you will need to change the list management settings using Tools -> Options) then remove the hit list of your query from this list and you get what you want. But again this is slightly cumbersome.





Maybe the best solution would be an action to remove a particular list from the current entries. A bit like the execute list function, but it removes the IDs from those that are currently displayed.


If you think this is a good idea then we can look to add it in a future version.








Tim

User 169b52bbd8

05-06-2008 02:38:28

Hi Tim,





You are right about the more complex queries. That is how this problem comes about.





Your solution would be OK, but to me it does not seem as logical (!) as including a NOT operator in the Query builder.





Cheers





David

ChemAxon fa971619eb

05-06-2008 07:36:59

David,





We'll investigate both approaches.





Tim