Reputation: 35
I have a table with Accounts that, if there are multiple matching ones, I need to combine to create a new one in a procedure.
The table looks like:
ACCT ID QTY LEI
A_1 2 200 NULL
A_2 3 200 NULL
A_3 3 200 0
A_1 3 100 NULL
BB_1 2 200 NULL
BB_2 2 100 NULL
BB_3 3 200 0
BB_1 3 100 NULL
What I am trying to do is:
End result of the above looks like this:
ACCT ID QTY LEI
A_X 2 200 NULL
A_X 3 500 0
BB_X 2 300 NULL
BB_X 3 300 0
Not sure what the best way of approaching this is, any ideas on this?
Upvotes: 0
Views: 403
Reputation: 12837
Upvotes: 1