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) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Import fails with SQL error on create table
Pages: [1]

Author Topic: Import fails with SQL error on create table  (Read 2898 times)

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Import fails with SQL error on create table
January 14, 2011, 07:03:38 pm
I am trying to import a small CSV with a few hundred household.

The URL for the screen with the error: http://www.mygroup.org/civicrm/import/contact


I get the SQL error:
Database Error Code: Identifier name 'acbpsarah_gladstone_________________________________________________________________________________' is too long, 1059
Additional Details:

Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> a515ac9c2796ca0e23adbe92c68fc9fc
    [message] => DB Error: a515ac9c2796ca0e23adbe92c68fc9fc
    [mode] => 16
    [debug_info] => CREATE TABLE civicrm_import_job_e8314c14324787c1297c3139b47b0f28 (`acbpsarah_gladstone______________________________________________________________________________________________bazx` text) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci [nativecode=1059 ** Identifier name 'acbpsarah_gladstone_________________________________________________________________________________' is too long]
    [type] => DB_Error
    [user_info] => CREATE TABLE civicrm_import_job_e8314c14324787c1297c3139b47b0f28 (`acbpsarah_gladstone______________________________________________________________________________________________bazx` text) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci [nativecode=1059 ** Identifier name 'acbpsarah_gladstone_________________________________________________________________________________' is too long]
    [to_string] => [db_error: message="DB Error: a515ac9c2796ca0e23adbe92c68fc9fc" code=0 mode=callback callback=CRM_Core_Error::handle prefix="" info="CREATE TABLE civicrm_import_job_e8314c14324787c1297c3139b47b0f28 (`acbpsarah_gladstone______________________________________________________________________________________________bazx` text) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci [nativecode=1059 ** Identifier name 'acbpsarah_gladstone_________________________________________________________________________________' is too long]"]



)

--------------------------------------


How is the Identifier name being generated? 
« Last Edit: January 15, 2011, 09:04:20 pm by sgladstone »
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

jalama

  • I post frequently
  • ***
  • Posts: 176
  • Karma: 22
    • Rooty Hollow LLC
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6 and 7
  • MySQL version: 5.1
  • PHP version: 5.2.5 and 5.3
Re: Import fails with SQL error on create table
March 16, 2011, 11:29:45 am
I'm seeing the same error, oddly for me it's happen all of the sudden I had done 3 imports just an hour ago with out changing a single setting.  I'm not sure why this is suddenly happening.
http://www.rootyhollow.com

jalama

  • I post frequently
  • ***
  • Posts: 176
  • Karma: 22
    • Rooty Hollow LLC
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6 and 7
  • MySQL version: 5.1
  • PHP version: 5.2.5 and 5.3
Re: Import fails with SQL error on create table
March 16, 2011, 11:33:58 am
And I'm an idiot, turns out OpenOffice switch my comma delimiters to semi-colons (I have no idea how though) which made the importing think all field headings on the first row were one giant field name
http://www.rootyhollow.com

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Import fails with SQL error on create table

This forum was archived on 2017-11-26.