Toad World® Forums

Possible to use only the Formula component of WHERE Condtion builder?


#1

I couldn’t figure this answer out from the Query Builder tech article. Should it be possible/OK to create a WHERE Condition statement in the Query Builder using just data from the Formula form?

For example: trying to create a query w/ multiple ORs for a single field. I couldn’t find any other way to do this, so I figured I’d just use the Formula tab to write the criteria directly. However, this causes the builder to generate incorrect query criteria.

TDA version 2.6.2.580

Steps to produce:

  1. Presume the following: Table: STUFF, Fields: ID, NAME
  2. Using the query builder, open the Where Condition
  3. In the Formula tab, create any basic query criteria: “STUFF”.“NAME” = ‘me’ OR “STUFF”.“NAME” = ‘you’. Leave the other tab (Form) blank. Click OK
  4. The WHERE clause created is then as follows:
    WHERE “STUFF”.“NAME” = ‘’ “STUFF”.“NAME” = ‘me’ OR “STUFF”.“NAME” = ‘you’

The first portion of the criteria is generated from the non-used Form tab of the Where Condition builder. AFAIK theres no way to indicate that you don’t wish to use the basic “Form” tab and just the “Formula” tab.

I realize I may be using the query builder in a manner its not designed for. So is there a way I am supposed to do this type of multiple criteria query?


#2

Currently the column criteria area of the Query Builder does not support mutiple ands or ors. Instead go to the toolbar and select the Global Where clause edtior. Here you can build your where clause and include as many ands or ors as you want. See screenshot.

Debbie
GlobalWhereClause.png