Para mim, pelo menos, demorou um pouco para acertar:
mysql>
mysql>
mysql> describe businesses.2017july;
+--------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------+-------------+------+-----+---------+-------+
| nom | varchar(45) | YES | | NULL | |
| product | varchar(45) | YES | | NULL | |
| unit | varchar(45) | YES | | NULL | |
| house | varchar(45) | YES | | NULL | |
| road | varchar(45) | YES | | NULL | |
| postal | varchar(45) | YES | | NULL | |
| phone | varchar(45) | YES | | NULL | |
| emps | varchar(45) | YES | | NULL | |
| town | varchar(45) | YES | | NULL | |
| typebusiness | varchar(45) | YES | | NULL | |
| client | int(11) | YES | | 2 | |
+--------------+-------------+------+-----+---------+-------+
11 rows in set (0.00 sec)
mysql>
mysql> select nom, phone, code_client, client from dolibarr.llx_societe limit 2;
+-------+-------+-------------+--------+
| nom | phone | code_client | client |
+-------+-------+-------------+--------+
| alpha | NULL | CU1711-0001 | 2 |
| beta | NULL | CU1711-0002 | 2 |
+-------+-------+-------------+--------+
2 rows in set (0.00 sec)
mysql>
mysql> describe dolibarr.llx_societe;
+-------------------------+--------------+------+-----+-------------------+-----------------------------+
| Field | Type | Null | Key | Default | Extra |
+-------------------------+--------------+------+-----+-------------------+-----------------------------+
| rowid | int(11) | NO | PRI | NULL | auto_increment |
| nom | varchar(128) | YES | | NULL | |
| name_alias | varchar(128) | YES | | NULL | |
| entity | int(11) | NO | | 1 | |
| ref_ext | varchar(128) | YES | | NULL | |
| ref_int | varchar(60) | YES | | NULL | |
| statut | tinyint(4) | YES | | 0 | |
| parent | int(11) | YES | | NULL | |
| tms | timestamp | NO | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
| datec | datetime | YES | | NULL | |
| status | tinyint(4) | YES | | 1 | |
| code_client | varchar(24) | YES | MUL | NULL | |
| code_fournisseur | varchar(24) | YES | MUL | NULL | |
| code_compta | varchar(24) | YES | | NULL | |
| code_compta_fournisseur | varchar(24) | YES | | NULL | |
| address | varchar(255) | YES | | NULL | |
| zip | varchar(25) | YES | | NULL | |
| town | varchar(50) | YES | | NULL | |
| fk_departement | int(11) | YES | | 0 | |
| fk_pays | int(11) | YES | | 0 | |
| fk_account | int(11) | YES | | 0 | |
| phone | varchar(20) | YES | | NULL | |
| fax | varchar(20) | YES | | NULL | |
| url | varchar(255) | YES | | NULL | |
| email | varchar(128) | YES | | NULL | |
| skype | varchar(255) | YES | | NULL | |
| fk_effectif | int(11) | YES | | 0 | |
| fk_typent | int(11) | YES | | 0 | |
| fk_forme_juridique | int(11) | YES | | 0 | |
| fk_currency | varchar(3) | YES | | NULL | |
| siren | varchar(128) | YES | | NULL | |
| siret | varchar(128) | YES | | NULL | |
| ape | varchar(128) | YES | | NULL | |
| idprof4 | varchar(128) | YES | | NULL | |
| idprof5 | varchar(128) | YES | | NULL | |
| idprof6 | varchar(128) | YES | | NULL | |
| tva_intra | varchar(20) | YES | | NULL | |
| capital | double | YES | | NULL | |
| fk_stcomm | int(11) | NO | | 0 | |
| note_private | text | YES | | NULL | |
| note_public | text | YES | | NULL | |
| model_pdf | varchar(255) | YES | | NULL | |
| prefix_comm | varchar(5) | YES | MUL | NULL | |
| client | tinyint(4) | YES | | 0 | |
| fournisseur | tinyint(4) | YES | | 0 | |
| supplier_account | varchar(32) | YES | | NULL | |
| fk_prospectlevel | varchar(12) | YES | | NULL | |
| fk_incoterms | int(11) | YES | | NULL | |
| location_incoterms | varchar(255) | YES | | NULL | |
| customer_bad | tinyint(4) | YES | | 0 | |
| customer_rate | double | YES | | 0 | |
| supplier_rate | double | YES | | 0 | |
| fk_user_creat | int(11) | YES | MUL | NULL | |
| fk_user_modif | int(11) | YES | MUL | NULL | |
| remise_client | double | YES | | 0 | |
| mode_reglement | tinyint(4) | YES | | NULL | |
| cond_reglement | tinyint(4) | YES | | NULL | |
| mode_reglement_supplier | tinyint(4) | YES | | NULL | |
| cond_reglement_supplier | tinyint(4) | YES | | NULL | |
| fk_shipping_method | int(11) | YES | | NULL | |
| tva_assuj | tinyint(4) | YES | | 1 | |
| localtax1_assuj | tinyint(4) | YES | | 0 | |
| localtax1_value | double(6,3) | YES | | NULL | |
| localtax2_assuj | tinyint(4) | YES | | 0 | |
| localtax2_value | double(6,3) | YES | | NULL | |
| barcode | varchar(255) | YES | MUL | NULL | |
| fk_barcode_type | int(11) | YES | | 0 | |
| price_level | int(11) | YES | | NULL | |
| outstanding_limit | double(24,8) | YES | | NULL | |
| default_lang | varchar(6) | YES | | NULL | |
| logo | varchar(255) | YES | | NULL | |
| canvas | varchar(32) | YES | | NULL | |
| import_key | varchar(14) | YES | | NULL | |
| webservices_url | varchar(255) | YES | | NULL | |
| webservices_key | varchar(128) | YES | | NULL | |
| fk_multicurrency | int(11) | YES | | NULL | |
| multicurrency_code | varchar(255) | YES | | NULL | |
+-------------------------+--------------+------+-----+-------------------+-----------------------------+
77 rows in set (0.00 sec)
mysql>
mysql> insert into dolibarr.llx_societe nom, phone, client select nom, phone, client from businesses.2017july;
ERROR 1064 (42000): 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 'nom, phone, client select nom, phone, client from businesses.2017july' at line 1
mysql>
mysql> insert into dolibarr.llx_societe select nom, phone, client from businesses.2017july;
ERROR 1136 (21S01): Column count doesn't match value count at row 1
mysql>
mysql>
mysql>
mysql>
mysql>
mysql>
mysql>
mysql>
mysql>
mysql> insert into dolibarr.llx_societe (nom, phone, client) select nom, phone, client from businesses.2017july;
Query OK, 13479 rows affected (3.28 sec)
Records: 13479 Duplicates: 0 Warnings: 0
mysql>
mysql>
mysql>
mysql> select count(*) from llx_societe;
ERROR 1046 (3D000): No database selected
mysql>
mysql> select count(*) from dolibarr.llx_societe;
+----------+
| count(*) |
+----------+
| 13485 |
+----------+
1 row in set (0.00 sec)
mysql>
mysql>
Está no banco de dados. Se dolibarr vai reclamar continua a ser visto. O campo code_client
é NULL
, onde deveria ter valores, eu acho.