| Title: | FOCUS, from INFORMATION BUILDERS | 
| Moderator: | ZAYIUS::BROUILLETTE | 
| Created: | Thu Feb 19 1987 | 
| Last Modified: | Mon May 05 1997 | 
| Last Successful Update: | Fri Jun 06 1997 | 
| Number of topics: | 615 | 
| Total number of notes: | 1779 | 
    When doing a table request and selecting records I have tried
    using masked fields.
    
    ex.
    	IF fieldname IS AA$$ OR BB$$ 
    
    This does not seem to be working correctly with more than
    one literal mask. The data in the reprot is incorrect.
    If I do not use the "OR" it works ok.
    
    ex. 
       IF fieldname IS AA$$
                      
    I am using an RDB/VMS database. Does this happen
    on a focus database. 
    
    
| T.R | Title | User | Personal Name | Date | Lines | 
|---|---|---|---|---|---|
| 149.1 | Using 'OR' in 'IF' statement of 'TABLE' request. | NRPUR::CUSACK | Wed Nov 09 1988 10:39 | 22 | |
|     I don't use Focus with Rdb, but I might be able to help with this
    question.  At least when using Focus' own database, you cannot use
    an 'OR' directly like that in an 'IF' statement of a 'TABLE' request.
    
    To do what you want, you must define a field, using the 'DEFINE'
    statement.  An example:
    
    	DEFINE FILE filename
    	FTEST/I1 = IF fieldname EQ 'AA$$' OR 'BB$$' THEN 1 ELSE 0;
    	END
    	TABLE FILE filename
    	PRINT fieldname
    	IF FTEST EQ 1
    	END
    
    It would be nice if you could do the 'OR' in the 'TABLE' request,
    but, you can't.  I am not sure if you can do a 'DEFINE' with Rdb,
    but I imagine that you should be able to.
    
    Regards,
    
    Mike
 | |||||
| 149.2 | THANK YOU | TUNER::CARNEY | Mon Nov 14 1988 09:27 | 7 | |
|     Mike
    	
    	Thank you for your help.  I agree with you that it would be
    	nice to have that functionality.  Your assumption is correct
    	that you can use define with rdb. 
    
    MC
 | |||||