Sorry for inconvenience,i thought i am simplifying the question but may be i made it more complex,previously the data was like this,
Table:
BRANCHCD BAL1 BAL2 ACMCD
SH14 10 - 111
SH14 11 - 112
SH14 - 1 211
in one table had bal1 for acmcd and bal2 for acmcd,onl one will be available at a time so don't worry about that case,so and i need it in following format.
BRANCHCD BAL1 ACMCD bal2 acmcd
SH14 10 111 1 211
SH14 11 112
if new rows added in Table are:
BRANCHCD BAL1 BAL2 ACMCD
SH14 2 212
SH14 3 213
then o/p should be
BRANCHCD BAL1 ACMCD bal2 acmcd
SH14 10 111 1 211
SH14 11 112 2 212
SH14 3 213