Loading data from a vertical database table into a horizontal database table