Consider a table like
debit credit code ----------------------------- 0 10 5 5 0 3 0 11 2 0 15
Please use below one in order by clause you will get the output that you are looking for
order by clause
order by cast(cast(code as varchar(50)) + cast(debit as varchar(2)+ cast(credit as varchar(2) as int)