Using ‘IF’ statements in query/400

5 pts.
Tags:
IF statement
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: June 24, 2009  8:02 PM
UPDATED: June 24, 2009  9:36 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

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

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following