Query

770 pts.
Tags:
AS/400
AS/400 Query
DB2/400
Hi Team, I have scenario with me. For that I need to create a query. The scenario is as follows: When My Location And Department is equal in the file I want to Multiply Quantity Column with Cost Column and Add it. Loc Dept Quantity Cost 1 10 10 2 1 10 10 3 1 10 11 5 2 10 10 7 For above example in the First, second and third record comes is in my scenario so I need to do a total 10*2 + 10*3 + 11*55=105 So The record looks like as follows Loc Dept Total 1 10 105 Can anyone please share the query related to above scenario. Please let me know if require more explanation. Thanks

Software/Hardware used:
DB2/400
ASKED: September 12, 2013  7:11 AM
UPDATED: September 12, 2013  1:30 PM

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.

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

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.

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
  • TomLiotta
    This is a very basic query that appears to be an academic question. Can you tell us what query product needs to be used? -- Tom
    125,585 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.

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