Can a join logical file only select highest value when multiple records are found?

15 pts.
Tags:
AS/400
Logical Files
Have a file of students (stu # as key), want to join to enrollment file & get the most recent activity date (could be many records for one student or one record for a student). Can a join logical file be created that would give me that? SQL can select via max operand. Does DDS have something like it?


Software/Hardware used:
OS/400 7.1
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 3  Replies

 
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.
  • philpl1jb

    No, not in any simple and straightforward way that I've ever seen.

    You can key on the primary file including Descending key on date so the First Record available is the newest .. that record would be the one selected in a chain. 

    54,090 pointsBadges:
    report
  • BillGood
    Thank you for the response.  I was hoping IBM had provided a way that I didn't know about.  Wouldn't a "MAX" function in DDS be helpful!  Thanks again 
    15 pointsBadges:
    report
  • philpl1jb

    Today, I totally avoid Join's.

    In RPG I would handle these two files separately. If a logical keyed the activity file by ID and date descending order all the better.

    Or embedded SQL

    54,090 pointsBadges:
    report

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.

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

Following

Share this item with your network: