Db2 fetch all customer details



IBM's flagship relational database management system

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.
Neha992
 
Posts: 2
Joined: Wed Aug 26, 2020 8:05 pm
Has thanked: 0 time
Been thanked: 0 time

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
prino
 
Posts: 635
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 28 times

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.
User avatar
sergeyken
 
Posts: 408
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 6 times
Been thanked: 40 times

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
Neha992
 
Posts: 2
Joined: Wed Aug 26, 2020 8:05 pm
Has thanked: 0 time
Been thanked: 0 time

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.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post