5 pts.
 Using ‘IF’ statements in query/400
I need to create a work field that will be populated differently, dependin on a series of 'If' statements. Ex: If TMRPER = 'M', use TMRFRQ value. If TMRPER = 'D', then use TMRFRQ divided by 30, rounded to the nearest whole number. Any idea how to do this?

Software/Hardware used:
ASKED: June 24, 2009  8:02 PM
UPDATED: June 24, 2009  9:36 PM

Answer Wiki:
Hi, The big issue is that you can't update fields in query/400. Normally, you cannot do any updates in query applications. Ron ------------------------------------------------ Here's the only way I can think of doing this in query/400 It requires two or three queries 1. Writes to an Outfile for 'M' records Setting the WrkFld = TMRFRQ 2. Adds to the Outfile for 'D' records Setting the WrkFld = TMRFRQ/30 Then if you need a report 3. Uses the Outfile to write your report. Phil
Last Wiki Answer Submitted:  June 24, 2009  9:35 pm  by  RonBender   155 pts.
All Answer Wiki Contributors:  RonBender   155 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _