Главная страница
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.032 c
3-1174936697
ChainickDenis
2007-03-26 23:18
2007.06.17
Что-то не соображу как запрос сформировать, пожскжите плиз...


2-1179914898
Thely
2007-05-23 14:08
2007.06.17
Иконки в TreeView?


15-1179837326
vitv
2007-05-22 16:35
2007.06.17
Вин+Лин на одном компе.


4-1168172596
algol
2007-01-07 15:23
2007.06.17
Запустить процесс, помогите кто чем может


2-1179905554
Алексин
2007-05-23 11:32
2007.06.17
проблемы с реализацией