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 Contacts Problem
Pages: [1]

Author Topic: Import Contacts Problem  (Read 1655 times)

ericaspen

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
  • CiviCRM version: 4.1.6
  • CMS version: Wordpress
  • MySQL version: 5.1
  • PHP version: 5.2
Import Contacts Problem
October 19, 2012, 02:49:51 pm
I apologize if there is a solution on the forums that I couldn't find. I did look!

Anyway, I'm attempting to import contacts with a fill or update duduping scheme and I keep getting a "Syntax Error" I can't easily update my install, so if that's the easy solution I'll need a workaround.

Imports work fine with other deduping settings.

Any ideas?

jern

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 0
    • SEN Magazine
  • CiviCRM version: 4.5.8
  • CMS version: Joomla 2.5.28
  • MySQL version: 5.5.40
  • PHP version: 5.4.33
Re: Import Contacts Problem
October 20, 2012, 03:26:32 am
You have most likely got a timeout or memory limit issue somewhere, which means you need to change php settings. Importing contacts uses a lot of resources. There are lots of threads on this subject.

ericaspen

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
  • CiviCRM version: 4.1.6
  • CMS version: Wordpress
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Import Contacts Problem
October 20, 2012, 11:36:31 am
Would that cause a Syntax Error?


Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Import Contacts Problem
October 20, 2012, 02:40:37 pm

can you give more details on the "Syntax Error"

can u enable debugging and also check the apache / php / civicrm logs to see if there is any more output

however, if this is a bug, u will need to upgrade and/or patch your install.

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

ericaspen

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
  • CiviCRM version: 4.1.6
  • CMS version: Wordpress
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Import Contacts Problem
October 22, 2012, 11:49:13 am
Here is the debug output from CiviCRM:

Code: [Select]
Database Error Code: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY id1, id2 ON DUPLICATE KEY UPDATE weight = weight + VALUES(weight)' at line 1, 1064
Additional Details:
Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -2
    [message] => DB Error: syntax error
    [mode] => 16
    [debug_info] => INSERT INTO dedupe (id1, id2, weight) SELECT 0 id1, 0 id2, 0 weight LIMIT 0 GROUP BY id1, id2 ON DUPLICATE KEY UPDATE weight = weight + VALUES(weight) [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY id1, id2 ON DUPLICATE KEY UPDATE weight = weight + VALUES(weight)' at line 1]
    [type] => DB_Error
    [user_info] => INSERT INTO dedupe (id1, id2, weight) SELECT 0 id1, 0 id2, 0 weight LIMIT 0 GROUP BY id1, id2 ON DUPLICATE KEY UPDATE weight = weight + VALUES(weight) [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY id1, id2 ON DUPLICATE KEY UPDATE weight = weight + VALUES(weight)' at line 1]
    [to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO dedupe (id1, id2, weight) SELECT 0 id1, 0 id2, 0 weight LIMIT 0 GROUP BY id1, id2 ON DUPLICATE KEY UPDATE weight = weight + VALUES(weight) [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY id1, id2 ON DUPLICATE KEY UPDATE weight = weight + VALUES(weight)' at line 1]"]
)

ericaspen

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
  • CiviCRM version: 4.1.6
  • CMS version: Wordpress
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Import Contacts Problem
October 29, 2012, 08:29:24 am
bump

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Import Contacts Problem
October 29, 2012, 08:43:34 am

can you reproduce this on our demo server? not sure where/how that query is generated with a missing "from clause"

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

ericaspen

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
  • CiviCRM version: 4.1.6
  • CMS version: Wordpress
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Import Contacts Problem
October 29, 2012, 09:09:06 am
I'll see if I can later today.

I have a NEW issue now, too. I can't delete any records, it says there are no records, but the External ID numbers don't seem to delete. Thus, the workaround I had planned (updating everything at once, as opposed to FILLing in different fields over time) will not work.

I may just see if I can get a brand new install.

The issue really is only occurring with "Update" and "Fill".

Eric.

ericaspen

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
  • CiviCRM version: 4.1.6
  • CMS version: Wordpress
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Import Contacts Problem
October 29, 2012, 05:26:43 pm
No time tonight, it looks like, to test it on the demo. Anybody have any ideas?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Import Contacts Problem

This forum was archived on 2017-11-26.