Db2 fetch all customer details

IBM's flagship relational database management system
Neha992
Posts: 2
Joined: Wed Aug 26, 2020 8:05 pm
Skillset: Mainframes
Referer: Internet

Db2 fetch all customer details

Postby Neha992 » Wed Aug 26, 2020 8:11 pm

I have table as below
Table 1:customer table. It stores customer status
Say customer-number
Customer-status

Table 2 : Customer-account
It stores accounts associated with a customet
Say customer-number
Account-number

Table 3:account table
It store account status
Say account number
Account status

I need to fetch all customers whose status is f and all accounts associated with it have status s
Can anyone help me with query.

User avatar
prino
Posts: 641
Joined: Wed Mar 11, 2009 12:22 am
Skillset: PL/I - CICS - DB2 - IDMS - REXX - JCL, most in excess of three decades
Referer: Google
Location: Vilnius, Lithuania
Contact:

Re: Db2 fetch all customer details

Postby prino » Thu Aug 27, 2020 9:55 pm

Ask your PHB to send you on a Db2 course.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy

User avatar
sergeyken
Posts: 458
Joined: Wed Jul 24, 2019 10:12 pm
Skillset: Assembler, JCL, Utilities, PL/I, C/C++, DB2, SQL, REXX, COBOL, etc. etc. etc.
Referer: Internet search

Re: Db2 fetch all customer details

Postby sergeyken » Fri Aug 28, 2020 11:07 pm

What exactly do you know about such thing as “(relational) database”?
Javas and Pythons come and go, but JCL and SORT stay forever.

Neha992
Posts: 2
Joined: Wed Aug 26, 2020 8:05 pm
Skillset: Mainframes
Referer: Internet

Re: Db2 fetch all customer details

Postby Neha992 » Fri Aug 28, 2020 11:17 pm

If our could have helped it would have been better.. Learning can be done at an stage

Robert Sample
Global moderator
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
Referer: other forum
Location: Dubuque, Iowa, USA

Re: Db2 fetch all customer details

Postby Robert Sample » Sat Aug 29, 2020 12:58 am

If our could have helped it would have been better.. Learning can be done at an stage
This is a HELP forum, not a WRITE-THE-CODE-FOR-YOU forum. If you posted your SQL code and asked what was wrong with it, you would get a lot more help. But the way you posted it sounds like you know NOTHING about SQL and want somebody to write the query for you, which is not the purpose of this forum.