If wonder if somebody can help me with two queries if have a table named holdings.
ID TotalCap Accname Accnumber
1 150000
1 175000
1 Brown
1 123
2 155000
2 195000
2 200000
2 Yellow
2 4567
The result should be
IDCapital(1) Capital(2) Capital(3) Accname Accnumber
1 150000 175000 Brown 123
2 155000 195000 200000 Yellow 4567
The second query will have to translate the Accountnumber to the New Account number
This tabel is named convertaccount
Accnumber NewAccount
123 321
4567 8453
The result should be
IDCapital(1) Capital(2) Capital(3) Accname Accnumber
1 150000 175000 Brown 321
2 155000 195000 200000 Yellow 8453
ID TotalCap Accname Accnumber
1 150000
1 175000
1 Brown
1 123
2 155000
2 195000
2 200000
2 Yellow
2 4567
The result should be
IDCapital(1) Capital(2) Capital(3) Accname Accnumber
1 150000 175000 Brown 123
2 155000 195000 200000 Yellow 4567
The second query will have to translate the Accountnumber to the New Account number
This tabel is named convertaccount
Accnumber NewAccount
123 321
4567 8453
The result should be
IDCapital(1) Capital(2) Capital(3) Accname Accnumber
1 150000 175000 Brown 321
2 155000 195000 200000 Yellow 8453