Subject | Re: [IBO] Simple parameter query question |
---|---|
Author | Markus Ostenried |
Post date | 2007-02-12T02:22:42Z |
On 2/12/07, mitch_landor <mlq97@...> wrote:
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
> Really I'm looking for a way to use an "all" parameter so I can get(Sorry, I hit the send button too early)
> all result permutations using only one base query by always passing
> all the possible parameters, rather than having to create lots of
> separate queries.
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