forums › forums › SQLyog › Using SQLyog › Problem importing CSV file
- This topic is empty.
-
AuthorPosts
-
-
June 2, 2005 at 11:12 pm #9028rakeshMember
Hi there,
I'm trying to import data into a table, by right clicking on the table > export / import > import data from CSV .
The problem I have is when I do the import, some rows get imported and some don't. I get a message box saying a certain number of warnings. How do I view the actual warning information?
Thanks for your help,
Rakesh
-
June 3, 2005 at 12:44 pm #18034ShadowMember
Issue a SHOW WARNINGS command from SQL window.
-
June 11, 2005 at 10:05 am #18035duffbeerMember
hi 🙂
i exported a table from my source db to a .csv file (i exported both with and without the column names at the top).
when i tried to “import from a .csv file” i selected the file to import, and executed the command, but nothing happened. it did not add the rows of data from the .csv file to the target table. this same result happened when trying to import both the .csv without the column names, and the .csv with the column names.
i did not select any options like overwrite, ignore, etc… all i wanted to do is append the source data to the target table.
what am i doing wrong?
i am using the enterprise trial version, to see if this app can do what i need.
so far it looks pretty but i still need to get the mission accomplished.
cheers,
duffbeer
-
June 11, 2005 at 12:10 pm #18036duffbeerMember
ok i played with the “Fields” and “Lines” character definitions, and finally got an error! (errors are so much better than having no clue!) 🙂
i got:
Error No. 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 'rn' ( 'topicid' ; 'topicimage' ; 'topictext' ; 'counter' ) at li
and that's all it shows!!! arrrrrgh! a partial error explanation is waaaaay worse than a whole error! 🙂
any help will be appreciated muchly. 🙂
cheers,
duffbeer
-
June 11, 2005 at 5:03 pm #18037RiteshMember
Very strange.
Can you mail me the CSV file? It will be very helpful if you can post screenshots of your CSV Import and Escape Characters window.
-
June 11, 2005 at 6:12 pm #18038duffbeerMember
ok .. here's a couple pics:
the first is what i see after i “successfully” export the table from the source db/table.
image 1:
the second is what i see after i “import” the data from the .csv to the target db/table – in this example, i see no error, but nothing was actually written to the target db/table.
image 2:
please note that the “special character” settings are identical in both the export and import operations.
note also that i “terminated” the field in this example with , and not just , because there are , in many of the actual fields of the topicname, and if i Terminate the Fields with just , this causes a false “field end” wherever there is a ,
i have tried using , and , and even ;,; for the character to Terminate a Field. none of these yield a successful import.
cheers,
duffbeer
-
June 11, 2005 at 7:09 pm #18039peterlaursenParticipant
I also get the error “error while importing data” with this dataset
'073F017A-8D15-4395-8916-E'|'Kilmé'
'07AFD950-6CB3-4953-9DCA-1'|'For Rita – Evening Take'
'0CEE48E5-6436-4FE3-B98D-A'|'maa'
'0E9C9C09-343F-4FB4-91A8-A'|'For Rita – Morning Take'
'11B8349C-75AB-4D5E-B50F-5'|'Tchai'
'12007753-F49C-4C6E-9715-8'|'Tariq'
'129C402A-A72B-4AC8-B2D6-6'|'Nejmet el Sahara'
'19E68636-889A-4FF9-8512-F'|'Blue Dessert'
'26928406-1FA7-4024-98BE-F'|'Chi Youm'
'2EB5C64D-8C50-45AF-AFBC-5'|'Tlete'
'A6EF2974-BB21-4EDB-8A87-5'|'El Wahha'
'AB93A970-B3C1-41F1-B2FC-F'|'Nour el Nar'
'B86A4270-81D5-4FF3-9C02-9'|'Min Samarkand'
'C343716A-B704-483B-8A16-9'|'Gibran'
'C7413231-8AB0-4645-B47C-1'|'Valse Arabe'
'E4EF30EA-C7A5-4D4F-880D-4'|'Baalbeck'
'FE98C40A-46F7-40AC-8182-8'|'Raml'
And this table definition:
CREATE TABLE `tablename1` (
`id` char(25) default NULL,
`pic` varchar(255) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
Export dialogue box in pic
I tried a lot of different settings and nothing works. Not even if data are exported with SQLyog and imported with the same settings.
Always thought that there was something wrong with this CSV feature. Besides it relates closely to problems with the “copy from clipboard” option previously discussed in the forum.
-
June 12, 2005 at 8:25 am #18040
-
June 12, 2005 at 8:26 am #18041RiteshMember
@peterlaursen: Can you mail me the actual .CSV file or a SQL dump of the table?
-
June 12, 2005 at 8:48 am #18042RiteshMemberShadow wrote on Jun 3 2005, 12:44 PM:Issue a SHOW WARNINGS command from SQL window.
Starting from v4.07, a SHOW WARNINGS button will be provided to easily view the warnings. This feature has already been implemented in the SQLyog v4.07 development tree.
-
June 12, 2005 at 11:08 am #18043duffbeerMember
ritesh wrote:
@duffbeer: What are the Create Table… stmts. of nuke_topics and cms_topics?======
ritesh – i don't see any Create Table… stmts. of nuke_topics and cms_topics.
again, i see no errors … when i try to import, there is simply no action, no error, nothing. it's as if the action is totally ignored.
— duffbeer
-
June 12, 2005 at 11:21 am #18044RiteshMember
By Create Table…, I mean the DDL statement that is used to create a table. I am attaching an image to depict my requirement.
-
June 12, 2005 at 12:22 pm #18045peterlaursenParticipant
You got mail ! 🙄
-
June 13, 2005 at 6:07 am #18046
-
June 13, 2005 at 6:09 am #18047
-
June 13, 2005 at 2:01 pm #18048peterlaursenParticipant
I still am not able to import anything!
Data look like (note there are no ” ' “s)
-