[Show all top banners]

bhan0001
Replies to this thread:

More by bhan0001
What people are reading
Subscribers
:: Subscribe
Back to: Kurakani General Refresh page to view new replies
 SQL help
[VIEWED 4652 TIMES]
SAVE! for ease of future access.
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.
 
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.
 
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
 


Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 7 days
Recommended Popular Threads Controvertial Threads
I hope all the fake Nepali refugee get deported
All the Qatar ailines from Nepal canceled to USA
MAGA मार्का कुरा पढेर दिमाग नखपाउनुस !
Travel Document for TPS (approved)
MAGA and all how do you feel about Trumps cabinet pick?
Those who are in TPS, what’s your backup plan?
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters