Body: <p>We never had a problem with the postal code, nothing has changed, but this time CiviMAIL generates an error, caused by a limit on the postal code (between 2000 and 3000). Where is this limitation/validation set?</p>
  
  <p>Drupal 7.61 CiviCRM 4.7.30 No extensions</p>
  
  <blockquote>
    <p>WHERE ROUND(address.postal_code) >= 2000<br>
     AND ROUND(address.postal_code) &lt;= 2999<br>
     AND contact_a.is_deleted = 0<br>
     AND contact_a.id NOT IN (<br>
       SELECT contact_id FROM civicrm_group_contact<br>
       WHERE civicrm_group_contact.status = 'Removed'<br>
       AND   civicrm_group_contact.group_id = 72 ) );<br>
       [nativecode=1292 ** Truncated incorrect DOUBLE value: 'NL-4651 JV']   [to_string]<br>
    => [db_error: message="DB Error: unknown error" code=-1 mode=callback<br>
    callback=CRM_Core_Error::exceptionHandler prefix=""<br>
    info="CREATE TEMPORARY TABLE civicrm_temp_group_contact_cache1878 </p>
  </blockquote>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-09T08:15:30.977Z
Comments.Text: I can not find the statement WHERE ROUND(address.postal_code) >= 2000 in any of the core code. What version of CiviCRM is this in and do you have any customizations or additional extensions?
Comments.UserDisplayName: ErikH - CiviCooP
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-10T05:01:36.243Z
Comments.Text: You might also try applying https://github.com/cividesk/civicrm-core/commit/7df0c30e37a163bf59d22c3bc5b4397f57faaa95 and see if it fixes the error for you
Comments.UserDisplayName: jitendra - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-13T01:55:06.623Z
Comments.Text: @ErikH-CiviCooP Version added, no extension.
Comments.UserDisplayName: MarkDQ
Tags: <civimail>
Title: Postcode limitations
ThreadText: # Postcode limitations
  
  (Asked by: username_0 on 2019-01-09)
  
  We never had a problem with the postal code, nothing has changed, but this time CiviMAIL generates an error, caused by a limit on the postal code (between 2000 and 3000). Where is this limitation/validation set?
  
  Drupal 7.61 CiviCRM 4.7.30 No extensions
  
  > WHERE ROUND(address.postal\_code) >= 2000  
  > AND ROUND(address.postal\_code) <= 2999  
  > AND contact\_a.is\_deleted = 0  
  > AND contact\_a.id NOT IN (  
  > SELECT contact\_id FROM civicrm\_group\_contact  
  > WHERE civicrm\_group\_contact.status = 'Removed'  
  > AND civicrm\_group\_contact.group\_id = 72 ) );  
  > [nativecode=1292 \*\* Truncated incorrect DOUBLE value: 'NL-4651 JV'] [to\_string]  
  > => [db\_error: message="DB Error: unknown error" code=-1 mode=callback  
  > callback=CRM\_Core\_Error::exceptionHandler prefix=""  
  > info="CREATE TEMPORARY TABLE civicrm\_temp\_group\_contact\_cache1878
  
  **Tags:** civimail
  
  > **Comments:**
  > **username_1**: I can not find the statement WHERE ROUND(address.postal_code) >= 2000 in any of the core code. What version of CiviCRM is this in and do you have any customizations or additional extensions?  
  > **username_2**: You might also try applying https://github.com/cividesk/civicrm-core/commit/7df0c30e37a163bf59d22c3bc5b4397f57faaa95 and see if it fixes the error for you  
  > **username_0**: @username_1 Version added, no extension.  
  
  ---
  
  ## 0 answers
  
  