SQL/400 statement

120 pts.
Tags:
SQL/400
I need help writing a sql400 statement. I want it to select 1 row with columns 1)company #, 2)part #, 3)purchase order #, 4)latest order date for group by company # and part # and order by company #, part #.....the goal here is to pick the row with the latest order date for each group. File is sorted by company # part # and order date desc....Thanks


Software/Hardware used:
SQL/400 for AS400 programming
1

Answer Wiki

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

That sounds like a test or homework question. Post your code you have written and we will take a look at it. Trying it yourself is the only way to learn and reinforce the concepts. 

I’ll give you a hint. you need to use MAX() in your statement

Discuss This Question: 1  Reply

 
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.
  • TheRealRaven
    What problem are you having with doing this? Are you simply asking us to create a statement for you? In general, if you aren't familiar with creating SQL statements, you shouldn't be using SQL in a business system -- significant problems can easily result.
    35,660 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: