Subject Re: [IBO] Simple parameter query question
Author Markus Ostenried
On 2/12/07, mitch_landor <mlq97@...> wrote:
> Really I'm looking for a way to use an "all" parameter so I can get
> all result permutations using only one base query by always passing
> all the possible parameters, rather than having to create lots of
> separate queries.

(Sorry, I hit the send button too early)

You could try something like this:

SELECT MyField1
FROM MyTable
WHERE (MyField2 = :MyParam) or (:MyParam IS NULL)

And then if you set "MyParam" to NULL you will get all records:

IB_Query1.ParamByName('MyParam').Clear;

HTH,
Markus