Subject | Re: [IBO] Simple parameter query question |
---|---|
Author | Markus Ostenried |
Post date | 2007-02-12T02:19:38Z |
On 2/12/07, mitch_landor <mlq97@...> wrote:
SELECT MyField1
FROM MyTable
WHERE (MyField2 = :MyParam) or (:MyParam IS NULL)
HTH,
Markus
> I know that one can create a paramter in a query and then reference itYou could try something like this:
> 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"?
SELECT MyField1
FROM MyTable
WHERE (MyField2 = :MyParam) or (:MyParam IS NULL)
HTH,
Markus