[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference ilbbak::ibi_focus

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

369.0. "define new field with IF-THEN-ELSE" by PENUTS::KROBICHAUD () Wed Sep 26 1990 11:54

    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.RTitleUserPersonal
Name
DateLines
369.1Single QuotesCSS::PETROPHWhat part of eternity is this ?Wed Sep 26 1990 15:056
    
    I think putting ' around the IN as 'IN' will solve your
    problem.
    
    Rich...
    
369.2RUNTUF::IMFRAWed Sep 26 1990 15:5323
    
    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.3new field now worksPENUTS::KROBICHAUDThu Sep 27 1990 12:317
    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