filter problem.

vijaydidmca2003vijaydidmca2003 Member Posts: 27
Suppose we have a table as given below:

Field1 Field2 Field3
10 0 0
20 30 0
0 40 40
0 0 50

How can we get an instance of table in which we will have values:

Field1 > 10 and Field2 > 30 and Field3 > 40.

Comments

  • krikikriki Member, Moderator Posts: 9,110
    I suppose you mean to get all the records in which Field1 > 10 and Field2 > 30 and Field3 > 40?
    TheTable.RESET;
    TheTable.SETCURRENTKEY("... some key"); // take the best fitting key
    TheTable.SETFILTER(Field1,'>10');
    TheTable.SETFILTER(Field2,'>30');
    TheTable.SETFILTER(Field3,'>40');
    IF TheTable.FINDSET THEN
      REPEAT
        ...
      UNTIL TheTable.NEXT = 0;
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.