if you find sort column missing you could try the following in your admin -> install sql patches

remember backup as im no expert !!

ALTER TABLE products_with_attributes_stock ADD sort int(11) NOT NULL default 0 after quantity;

then run the stock by attributes install again

hope this helps
bn