Sales order update without Dimension

Hi all

At client side, the user created the sales order and they forget to select the dimension(department), they have just created the sales order not they are confirmed nothing.Can you suggest me how can i update as there are 10000 sales order and their lines. can i update it from table salestable and salesline.please suggest me.

thanks