How to parse a complex logical formula ?



Hi to all,

I develop a simple GUI which contains search criteria. User enters a
criteria and when click on OK, the app execute the corresponding SQL
statement.

The criteria could be a formula string such as:
((A OR B AND C) OR (D AND E)) OR F

I would like to parse this kind of formula in order to separate the
subsets (A OR B AND C), (D AND E), ... and then convert it to SQL
syntax.

Is there a simple way for doing that?

Thanks for your help

Marie

.



Relevant Pages

  • Re: mail merge filter criteria
    ... and that it will occur as soon as you have an OLE DB connection to a data source and specify "is blank" or perhaps "is not blank" as one of the criteria in your "Advanced criteria". ... is null (which in Excel appears to correspond to a cell with no text or formula in it ... The Jet SQL that is used to get data from Excel actually retrieves both ...
    (microsoft.public.word.mailmerge.fields)
  • Re: SQL queries that have parameters passed by user
    ... Erland Sommarskog wrote: ... >> several fields and filters on a criteria that I would like to be user ... >> The query works fine in MS SQL and seems to be fairly quick, ...
    (comp.databases.ms-sqlserver)
  • Re: SQL Syntax Error
    ... match all the criteria you input. ... SQL view and never open it in the query grid view. ... The syntax for the "where" statement is incorrect becuase of this. ...
    (microsoft.public.access.queries)
  • Re: QueryTables - Retrieving Data
    ... data in Excel then filter it using cell formulas, pass your criteria ... ('sql datasource' is particularly vague; if you mean SQL Server then ... The column has an eight digit account code that I need to ... When I 'double click' a cell in the accountnumber ...
    (microsoft.public.excel.misc)
  • Re: multiple OR criteria
    ... Based on the SQL, your table is more like a spreadsheet than a relational ... those criteria? ... I have set up multiple OR criteria in the query looking for ...
    (microsoft.public.access.queries)