[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

bjoern

10/18/2005 9:25:00 AM

Hi,

I've a form that uses a filter section, to enable the user to fill in some
filter criteria. These criteria will be processed at the executeQuery-Method
of the Table. The results are only records that match all criteria, but I
need all records that match any of the criteria. Is there any possibility to
have a disjunction filter?

Thanks for your help!

2 Answers

José M. Guisado

10/18/2005 2:39:00 PM

0


If what you are searching for is to act as an "OR" query, equivalent to:

select myTable
where myTable.A == x ||
myTable.B == y;

try to pass something like this:

strFmt(''((%1 == %2) || (%3 == %4))'',
fieldStr(MyTable,A), x,
fieldStr(MyTable,B), y)


as an argument to value() method, instead of a simple string.

There was a complete article on the old Technet related to this, titled
"Expressions in Query Ranges".

Hope this helps.

Regards,

Jose



> Hi,
>
> I''ve a form that uses a filter section, to enable the user to fill in some
> filter criteria. These criteria will be processed at the
> executeQuery-Method
> of the Table. The results are only records that match all criteria, but I
> need all records that match any of the criteria. Is there any possibility
> to
> have a disjunction filter?
>
> Thanks for your help!
>


bjoern

10/18/2005 3:02:00 PM

0

not as difficult as I thought :-)

thanks a lot jose

"jmg" wrote:

>
> If what you are searching for is to act as an "OR" query, equivalent to:
>
> select myTable
> where myTable.A == x ||
> myTable.B == y;
>
> try to pass something like this:
>
> strFmt(''((%1 == %2) || (%3 == %4))'',
> fieldStr(MyTable,A), x,
> fieldStr(MyTable,B), y)
>
>
> as an argument to value() method, instead of a simple string.
>
> There was a complete article on the old Technet related to this, titled
> "Expressions in Query Ranges".
>
> Hope this helps.
>
> Regards,
>
> Jose
>
>
>
> > Hi,
> >
> > I''ve a form that uses a filter section, to enable the user to fill in some
> > filter criteria. These criteria will be processed at the
> > executeQuery-Method
> > of the Table. The results are only records that match all criteria, but I
> > need all records that match any of the criteria. Is there any possibility
> > to
> > have a disjunction filter?
> >
> > Thanks for your help!
> >
>
>
>