Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2007.06.17;
Скачать: CL | DM;

Вниз

Можно ли объединить два фильтра   Найти похожие ветки 

 
delphino   (2007-05-25 12:12) [0]

Query1.Filter:="S_Name="+quotedstr(ComboBox1.Text+"*");
Query1.Filter:="S_Type="+quotedstr(ComboBox2.Text+"*");


 
ЮЮ ©   (2007-05-25 12:15) [1]

А так разве не работает?

Query1.Filter:=
 "S_Name="+quotedstr(ComboBox1.Text+"*" +
 " AND " +
 "S_Type="+quotedstr(ComboBox2.Text+"*");


 
delphino   (2007-05-28 03:32) [2]


> А так разве не работает?
>
> Query1.Filter:=
>  "S_Name="+quotedstr(ComboBox1.Text+"*" +
>  " AND " +
>  "S_Type="+quotedstr(ComboBox2.Text+"*");

нет


 
ЮЮ ©   (2007-05-28 03:43) [3]

> нет

Странно, а справка гоаорит - да:

Filters can compare field values to literals and to constants using the following comparison and logical operators:

Operator Meaning
< Less than
> Greater than
>= Greater than or equal to
<= Less than or equal to
= Equal to
<> Not equal to
AND Tests two statements are both True
NOT Tests that the following statement is not True
OR Tests that at least one of two statements is True
+ Adds numbers, concatenates strings, adds numbers to date/time values (only available for some drivers)
- Subtracts numbers, subtracts dates, or subtracts a number from a date (only available for some drivers)
* Multiplies two numbers (only available for some drivers)
/ Divides two numbers (only available for some drivers)
* wildcard for partial comparisons (FilterOptions must include foPartialCompare)
By using combinations of these operators, you can create fairly sophisticated filters. For example, the following statement checks to make sure that two test conditions are met before accepting a record for display:

(Custno > 1400) AND (Custno < 1500);


 
delphino   (2007-05-28 05:34) [4]


> (Custno > 1400) AND (Custno < 1500);

Здесь фильтр по одному полю. А у меня два фильтра по разным полям. Может в этом дело?


 
Loginov Dmitry ©   (2007-05-28 08:29) [5]

> Здесь фильтр по одному полю. А у меня два фильтра по разным
> полям. Может в этом дело?


Число полей не имеет значения.



Страницы: 1 вся ветка

Текущий архив: 2007.06.17;
Скачать: CL | DM;

Наверх




Память: 0.48 MB
Время: 0.017 c
2-1180303179
Просто_новичок
2007-05-28 01:59
2007.06.17
максимальное количество символов в string


11-1161959362
Max727
2006-10-27 18:29
2007.06.17
Как получить список таблиц?


1-1177061372
Лысеющий Самурай
2007-04-20 13:29
2007.06.17
Как получить выделенный текст


3-1175058426
MZ
2007-03-28 09:07
2007.06.17
как реализовать в Gride выборку отдельных записей CheckBox ом


15-1179784204
Германн
2007-05-22 01:50
2007.06.17
Спам на форуме