Subject Re: [IBO] Simple parameter query question
Author Markus Ostenried
On 2/12/07, mitch_landor <mlq97@...> wrote:
> I know that one can create a paramter in a query and then reference it
> using parambyname, but how can I create a single query that will for
> example allow CustomerID
> sometimes to return "44" and sometimes to return all rows? What is the
> parameter for "all"?

You could try something like this:

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

HTH,
Markus