Главная страница
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.025 c
2-1179903497
RomanLN
2007-05-23 10:58
2007.06.17
как в DBgrib вять(присвоить) содержимое нужной ячейки


2-1180337522
vpbar
2007-05-28 11:32
2007.06.17
Ошибка компилятора Delphi или просто особенность??


15-1179611606
Marser
2007-05-20 01:53
2007.06.17
Список изменений в версии Delphi 7 сравнительно с более старыми


6-1164640713
Diamond
2006-11-27 18:18
2007.06.17
Socket.ReceiveBuf ломается с ИС


3-1174895674
Nikefest
2007-03-26 11:54
2007.06.17
Русские буквы в базе