View Single Post
  #6 (permalink)  
Old May 18th, 2007, 03:36 PM
sshelper sshelper is offline
Authorized User
Join Date: Oct 2005
Location: , , .
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts

Just a warning to the query I provided. If the customer has accounts in all branches and in some branches he has more than 1, that customer will not be returned by the query because his total accounts is more than the number of branches.

Another possible scenario where the query will not return proper results is when the customer has multiple accounts in one branch but none in the other branches and still his total number of accounts matches the total number of branches.

SQL Server Helper
How well do you know SQL? Find out with the free test assessment from SQL Server Helper!!!

Got a SQL Server Question? Ask us here:
Reply With Quote