stored procedure for getting all orders