[VIEWED 4607
TIMES]
|
SAVE! for ease of future access.
|
|
|
bhan0001
Please log in to subscribe to bhan0001's postings.
Posted on 09-24-06 3:08
PM
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
I have 4 table(acct, customer, loan and branch) now i need to write a sql statement to find the name of every customer who have an acct in every branch that one customer(let say X) has an acct in.. Any help???????? would be appriciated. Thanks.
|
|
|
|
matribhumi
Please log in to subscribe to matribhumi's postings.
Posted on 09-24-06 3:16
PM
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
select * from customer, branch, account where customer. =branch.id and branch.=account.id This statement will give you all the customers who have an account in every branch.
|
|
|
oz
Please log in to subscribe to oz's postings.
Posted on 09-24-06 5:58
PM
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
I believe table Loan has nothing to do with the problem and following will solve your problem : SELECT Account.CustNo From Account Where Account.BranchNo in (SELECT Account.BranchNo FROM Account WHERE Account.CustNo = 1) Good Luck
|
|