Projects / csvtosql / Comments

Comments for csvtosql

16 Aug 2004 01:26 davideconsonni

Re: It fails the Java CookBook test
via http://csvtosql.sourceforge.net/jws.php you can try
the java web start version of csvtosql (version 1.8) that solve this problem, i will do file release in a few days.

thanks for comments :).

the bug can be inserted at
http://sourceforge.net/tracker/?group_id=110195&atid=655677

16 Aug 2004 00:16 jimcp

Re: It fails the Java CookBook test
Don't misunderstand me pls. I really like your program ! The way you designed renderers, grammars, writers is really cool.

CSV is just sooo difficult.

15 Aug 2004 22:58 davideconsonni

Re: It fails the Java CookBook test


> what is wrong line ?

sorry the wrong line was the 5th :) :)


with new version of cvstosql (1.8) will work.


the next version will be released in a few days.


this is the new test with cvs version


mysql> INSERT INTO prova (uno, due) VALUES ('Hello', 'World');


Query OK, 1 row affected (0.00 sec)


mysql> INSERT INTO prova (uno, due) VALUES ('123', '456');


Query OK, 1 row affected (0.00 sec)


mysql> INSERT INTO prova (uno, due) VALUES ('LU', '\"86.25|\"\"11/4/1998\"\"|\"\"2:19PM\"\"|+4.0625\"');


Query OK, 1 row affected (0.01 sec)


mysql> INSERT INTO prova (uno, due) VALUES ('\"bad \"\"input\"\"\"', '1.23E+03');


Query OK, 1 row affected (0.00 sec)


mysql> INSERT INTO prova (uno, due) VALUES ('XYZZY', '\"|\"\"OReilly & Associates| Inc.\"\"|\"\"Darwin| Ian\"\"|\ "\"a \\"\"glug\\"\" bit|\"\"|5|\"\"Memory fault| core NOT dumped\"\"\"');


Query OK, 1 row affected (0.00 sec)


15 Aug 2004 22:43 davideconsonni

Re: It fails the Java CookBook test


> 4 out of 5 ;-)

why 4 of 5 ?


what is wrong line ?


Davide

14 Aug 2004 22:38 jimcp

It fails the Java CookBook test
The famous testcase as published in the well know Java CookBook:

Hello;World

123;456

LU;"86.25|""11/4/1998""|""2:19PM""|+4.0625"

"bad ""input""";1.23E+03

XYZZY;"|""OReilly & Associates| Inc.""|""Darwin| Ian""|""a \""glug\"" bit|""|5|""Memory fault| core NOT dumped"""

Transforming this CSV using csvtosql yields the following in MySQL:

INSERT INTO TEST (A, B) VALUES ("Hello", "World");

INSERT INTO TEST (A, B) VALUES ("123", "456");

INSERT INTO TEST (A, B) VALUES ("LU", "\"86.25|\"\"11/4/1998\"\"|\"\"2:19PM\"\"|+4.0625\"");

INSERT INTO TEST (A, B) VALUES ("\"bad \"\"input\"\"\"", "1.23E+03");

INSERT INTO TEST (A, B) VALUES ("XYZZY", "\"|\"\"OReilly & Associates| Inc.\"\"|\"\"Darwin| Ian\"\"|\"\"a \\"\"glug\\"\" bit|\"\"|5|\"\"Memory fault| core NOT dumped\"\"\"");

4 out of 5 ;-)

Screenshot

Project Spotlight

ReciJournal

An open, cross-platform journaling program.

Screenshot

Project Spotlight

Veusz

A scientific plotting package.