| 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 | 
    I'm trying to create a new field based on two other fields.
    
    new_field/a10 = if field_a eq IN then new_field eq field_b else
    			new_field eq field_c;
    
    I keep getting errors that I'm compairing numeric to alpha, etc. Field
    a, b, c are all in my mas file, which is two rdb table files in a join
    statement. 
    
    Keith
| T.R | Title | User | Personal Name | Date | Lines | 
|---|---|---|---|---|---|
| 369.1 | Single Quotes | CSS::PETROPH | What part of eternity is this ? | Wed Sep 26 1990 14:05 | 6 | 
|     
    I think putting ' around the IN as 'IN' will solve your
    problem.
    
    Rich...
    
 | |||||
| 369.2 | RUNTUF::IMFRA | Wed Sep 26 1990 14:53 | 23 | ||
|     
    Here is a stab at what I think you're attempting:
    
      NEW_FIELD/A10 = IF FIELD_A EQ 'IN' THEN FIELD_B ELSE FIELD_C;
    
    
    . . . . . .
    
    where:
    
    
    content of new_field       content of field_a
    --------------------       ------------------
    
    value of field_b                  IN
    
    value of field_c           any value other than IN
    
    
    good luck
    
    
    
 | |||||
| 369.3 | new field now works | PENUTS::KROBICHAUD | Thu Sep 27 1990 11:31 | 7 | |
|     RE .1 Sorry, I tried that route already and recived '(foc282) result of
    expression not campatable with format of field: bypassing to end of
    command
    
    RE.2 YES, thanks that works just the way it should....
    
    Keith
 | |||||