I am following Ivan\'s tutorial (Adding order attribute to the orders grid in Magento 1.4.1) to add an extra column to the sales_order_grid table (the Shipping Description t
this should work:
$select = $this->getConnection()->select();
$select->join(
array('order_shipping'=>$this->getTable('sales/order')),//alias=>table_name
$this->getConnection()->quoteInto(
'order_shipping.entity_id = order_grid.entity_id',
Mage_Sales_Model_Quote_Address::TYPE_SHIPPING
),//join clause
array('shipping_description' => 'shipping_description')//fields to get
);
$this->getConnection()->query(
$select->crossUpdateFromSelect(
array('order_grid' => $this->getTable('sales/order_grid'))
)
);
If you want, take a look at my extension :)
HTH