Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Magento Enterprise 1.12 Sql Error in Customer->View Recent Orders
 
ramanzeon
Jr. Member
 
Total Posts:  5
Joined:  2012-10-09
 

Hello Pals,

I am getting below error when I go to Manage Customers -> select any customer -> In Customer View tab -> Click on Recent Orders.

It should show recent orders of that customers.
But unfortunately it throws exception as below :

SQL: SELECT `main_table`.* FROM `sales_flat_order_grid` AS `main_table` WHERE (main_table.customer_id = ‘7’) UNION ALL SELECT `main_table`.* FROM `enterprise_sales_order_grid_archive` AS `main_table` WHERE (main_table.customer_id = ‘7’) ORDER BY main_table.created_at DESC LIMIT 5
TIME: 0.0023

## 2013-05-27 07:16:00
EXCEPTION
exception ‘PDOException’ with message ‘SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘main_table.created_at’ in ‘order clause’’ in D:\wamp\www\example\lib\Zend\Db\Statement\Pdo.php:228
Stack trace:
#0 D:\wamp\www\example\lib\Zend\Db\Statement\Pdo.php(228): PDOStatement->execute(Array)
#1 D:\wamp\www\example\lib\Varien\Db\Statement\Pdo\Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 D:\wamp\www\example\lib\Zend\Db\Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 D:\wamp\www\example\lib\Zend\Db\Adapter\Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 D:\wamp\www\example\lib\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query(’SELECT `main_ta...’, Array)
#5 D:\wamp\www\example\lib\Varien\Db\Adapter\Pdo\Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query(’SELECT `main_ta...’, Array)
#6 D:\wamp\www\example\lib\Zend\Db\Adapter\Abstract.php(734): Varien_Db_Adapter_Pdo_Mysql->query(’SELECT `main_ta...’, Array)
#7 D:\wamp\www\example\lib\Varien\Data\Collection\Db.php(734): Zend_Db_Adapter_Abstract->fetchAll(’SELECT `main_ta...’, Array)
#8 D:\wamp\www\example\app\code\core\Mage\Core\Model\Resource\Db\Collection\Abstract.php(521): Varien_Data_Collection_Db->_fetchAll(’SELECT `main_ta...’, Array)
#9 D:\wamp\www\example\lib\Varien\Data\Collection\Db.php(566): Mage_Core_Model_Resource_Db_Collection_Abstract->getData()
#10 D:\wamp\www\example\app\code\core\Mage\Adminhtml\Block\Widget\Grid.php(533): Varien_Data_Collection_Db->load()
#11 D:\wamp\www\example\app\code\core\Mage\Adminhtml\Block\Customer\Edit\Tab\View\Orders.php(60): Mage_Adminhtml_Block_Widget_Grid->_prepareCollection()
#12 D:\wamp\www\example\app\code\core\Mage\Adminhtml\Block\Widget\Grid.php(626): Mage_Adminhtml_Block_Customer_Edit_Tab_View_Orders->_prepareCollection()
#13 D:\wamp\www\example\app\code\core\Mage\Adminhtml\Block\Widget\Grid.php(632): Mage_Adminhtml_Block_Widget_Grid->_prepareGrid()
#14 D:\wamp\www\example\app\code\core\Mage\Core\Block\Abstract.php(862): Mage_Adminhtml_Block_Widget_Grid->_beforeToHtml()
#15 D:\wamp\www\example\app\code\core\Mage\Core\Block\Text\List.php(43): Mage_Core_Block_Abstract->toHtml()
#16 D:\wamp\www\example\app\code\core\Mage\Core\Block\Abstract.php(863): Mage_Core_Block_Text_List->_toHtml()
#17 D:\wamp\www\example\app\code\core\Mage\Core\Model\Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#18 D:\wamp\www\example\app\code\core\Mage\Core\Controller\Varien\Action.php(390): Mage_Core_Model_Layout->getOutput()
#19 D:\wamp\www\example\app\code\local\Mage\Adminhtml\controllers\CustomerController.php(434): Mage_Core_Controller_Varien_Action->renderLayout()
#20 D:\wamp\www\example\app\code\core\Mage\Core\Controller\Varien\Action.php(419): Mage_Adminhtml_CustomerController->lastOrdersAction()
#21 D:\wamp\www\example\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch(’lastOrders’)
#22 D:\wamp\www\example\app\code\core\Mage\Core\Controller\Varien\Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#23 D:\wamp\www\example\app\code\local\Mage\Core\Model\App.php(369): Mage_Core_Controller_Varien_Front->dispatch()
#24 D:\wamp\www\example\app\Mage.php(683): Mage_Core_Model_App->run(Array)
#25 D:\wamp\www\example\index.php(87): Mage::run(’’, ‘store’)
#26 {main}

Guys any help is appreciated.

Thanks,

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top