strqry on AS400

5 pts.
Tags:
STRQRY
table a >>>> part vendor >> 1: N 
 table b >>>>> vendor lastpurchdate 
 join table A and B with vendor want to choose vendor with most current date :
 ie. (a) part vendor (b) vendor lastpurchdate 
 123 vendA vendA 20190101
 123 vendB vendB 20191231 which would be vendB 20191231 for part 123
 
 how is this put into a query ?
 Position to line  . . . . .                                           
 Line   ....+....1....+....2....+....3....+....4....+....5....+....6...
        Plant  Part                  Vendor      Priority  Last        
        Code   Number                Number      Sequence  Purchase    
                                                           Date        
  000011  40    ALU.190X60X120-5052H  RYERSC           2     2010-07-22  
  000012  40    ALU.190X60X120-5052H  RYER1000        1     2010-03-09  
choose  rec 11   2010-07-22  is most recent - RYERSC is vendor chosen
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: 2  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.
  • ToddN2000
    It is not too complicated of a task. What have you written so far? Post it We can help you fix your mistakes. This way you will learn by doing it. Practicing it over and over will help reinforce the knowledge. 
    133,790 pointsBadges:
    report
  • ToddN2000
    It looks like you are missing some info as well.
    What tables are Plant Code and Priority sequence in A or B ?
    133,790 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: