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.
Db2 fetch all customer details
- 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
Ask your PHB to send you on a Db2 course.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
robert.ah.prins @ the.17+Gb.Google thingy
- 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
What exactly do you know about such thing as “(relational) database”?
Javas and Pythons come and go, but JCL and SORT stay forever.
Re: Db2 fetch all customer details
If our could have helped it would have been better.. Learning can be done at an stage
-
- 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
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.If our could have helped it would have been better.. Learning can be done at an stage