In my processing if I know a set of owners , can I automatically pick up all the accounts jointly owned by them ?
For Example if I have owners O1 and O2, can I get only A1 account in a Query?
I tried the Following and it returned two rows and I programmatically looked at each account no and went to the DB2 table to find the owners and compared with owners O1 and O2 and narrowed on one.
Select Account_No, Count(*) from MATSER TABLE
Group by Account_no, having Count(*) > 1
Order by Account_No.
This query is a part of a process, where in I will get specific owners and I need to find the associated Joint account existence.
As per my current process, due to my query I will get both A1 and A5, then I will pick up each account and will go to table again and pick up the owners and compare them with my input owners.
For example if my process gives me Owner Id as O4 and O5, here are my steps
1) Run above Query - Store result in a table ( 2 in this case)
2) Perform Result till end of table
a) Pick up 1st result i.e., Account No , go to table and get owners - This will return O1 and O2.
b) Compare these owners with my input owner Id's O4 and O5, they are not same, then ignore and go to next account.
c) For the next account , go to table and get the owners - This will return O4 and O5.
d) Compare these owners with my input O4 and O5, they are same, and there is an existence of Joint account for these owners and stop the above loop.
Please note even though two owners can have multiple accounts, I am interested only one of them (Like in the above example if O1 and O2 also own A6, I am interested to know whether there is a joint account exists or not for O1 and O2)
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum