CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 2.2 Release Testing »
  • Can't Import State and Country 'cause Already in Numeric Code
Pages: [1]

Author Topic: Can't Import State and Country 'cause Already in Numeric Code  (Read 1675 times)

farmrchrys

  • I post occasionally
  • **
  • Posts: 92
  • Karma: 2
    • Spokane Moves to Amend the Constitution (under development)
  • CiviCRM version: CiviCRM 4.4.6
  • CMS version: Drupal 7.31
  • MySQL version: MySQL 5.5.37
  • PHP version: PHP 5.3.28
Can't Import State and Country 'cause Already in Numeric Code
February 05, 2009, 04:09:38 pm
I'm attempting to try and import some contact data using the SQL Query method from another (civicrm 2.0) database where the state and country fields are already in numeric form and it looks like CiviCRM expects these values to be in the ISO 3166-1-alpha-2 code form so it can convert them on import.  :'(.

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Can't Import State and Country 'cause Already in Numeric Code
February 10, 2009, 01:39:18 am
Quote from: farmrchrys on February 05, 2009, 04:09:38 pm
I'm attempting to try and import some contact data using the SQL Query method from another (civicrm 2.0) database where the state and country fields are already in numeric form and it looks like CiviCRM expects these values to be in the ISO 3166-1-alpha-2 code form so it can convert them on import.  :'(.

Currently CiviCRM doesn’t support country_id as an import field. That said, you can create a simple query that will add the country name based on the country_id you have – simply JOIN civicrm_country ON (country_id = civicrm_country.id) and add civicrm_country.name to the SELECT part.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 2.2 Release Testing »
  • Can't Import State and Country 'cause Already in Numeric Code

This forum was archived on 2017-11-26.