...From #Workbook
Where TransactionType Not In ('Opening','Closing')
select * from #Workbook
ORDER By ID, PortfolioID, CashAccountType, CashAccountSubType, CcySettle, DateItem, Sequence
drop table #Workbook
and as i said above i want to merge the opening and closing balances and include...