Body: <p>I get a DB Error when exporting contact search results using the "Merge Household Members into their Households" option (image below).  Only this merge option causes the error.  The others do not.</p>
  
  <p>I am using CiviCRM 4.7.1.  I didn't get this error with any version of 4.6 I used.</p>
  
  <p>I was able to reproduce on both the WordPress and Drupal sandboxes.</p>
  
  <p><a href="https://i.sstatic.net/z0cKN.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/z0cKN.png" alt="WordPress Sandbox Error Message"></a></p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-02-23T20:02:19.263Z
Comments.Text: I upgraded our test site to 4.7.2.  It still fails.  It fails if you try to export 100s or just one contact.  It fails when you export a organization contact for which households merging isn't an issue.  It's easy to reproduce just run a contact search, select one or more contact, select export and select the merge households option.
Comments.UserDisplayName: George Lozier
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-02-27T15:31:21.173Z
Comments.Text: Could this be related to this bug [CRM-17073](https://issues.civicrm.org/jira/browse/CRM-17073?jql=text%20~%20%22Merge%20Household%20Members%20into%20their%20Households%22)?
Comments.UserDisplayName: George Lozier
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-03-07T16:16:29.730Z
Comments.Text: This is partial fixed in 4.7.3 and 4.7.4 (available WordPress demo site).  It works with the "Export Primary fields" option but it still fails with the "Select fields for export" option.
Comments.UserDisplayName: George Lozier
Tags: <database><export><4.7><households>
Title: Export Fails when Merge Households Option Used
ThreadText: # Export Fails when Merge Households Option Used
  
  (Asked by: username_0 on 2016-02-19)
  
  I get a DB Error when exporting contact search results using the "Merge Household Members into their Households" option (image below). Only this merge option causes the error. The others do not.
  
  I am using CiviCRM 4.7.1. I didn't get this error with any version of 4.6 I used.
  
  I was able to reproduce on both the WordPress and Drupal sandboxes.
  
  [![WordPress Sandbox Error Message](https://i.sstatic.net/z0cKN.png)](https://i.sstatic.net/z0cKN.png)
  
  **Tags:** database, export, 4.7, households
  
  > **Comments:**
  > **username_0**: I upgraded our test site to 4.7.2.  It still fails.  It fails if you try to export 100s or just one contact.  It fails when you export a organization contact for which households merging isn't an issue.  It's easy to reproduce just run a contact search, select one or more contact, select export and select the merge households option.  
  > **username_0**: Could this be related to this bug [CRM-17073](https://issues.civicrm.org/jira/browse/CRM-17073?jql=text%20~%20%22Merge%20Household%20Members%20into%20their%20Households%22)?  
  > **username_0**: This is partial fixed in 4.7.3 and 4.7.4 (available WordPress demo site).  It works with the "Export Primary fields" option but it still fails with the "Select fields for export" option.  
  
  ---
  
  ## 0 answers
  
  