Using ‘IF’ statements in query/400
5 pts.
0
Q:
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?
ASKED: Jun 24 2009  8:02 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
24610 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
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 Answered: Jun 24 2009  9:35 PM GMT by Philpl1jb   24610 pts.
Latest Contributors: RonBender   155 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



0