Hi, i'm working on migrating csv data into MySQL using jsp.

I would like to know if the sql statement shown below can be used in jsp and where i can get examples on the codes.

String sql3 = "LOAD DATA LOCAL INFILE 'test.csv' INTO TABLE test FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n'";

Please do help. Thank u =)

Must it be Jsp?
If no then go for MySQL workbench. It is great app for design, Administration and Querying MySQL database. If it must be JSP then learn JDBC.

hi. Thank you but i have yet to solve my issue.i appreciate your help.Thanks again.

so what is the problem? Did you try any of above, or even bother to read my post?

Hi, yes i did read it.As my project require me to use jsp i don't have much choice.i try using HSSF to import excel to MySQL. I'm still trying to figure it out.

I do not believe you are limited to only JSP. You just do not want to say truth that you do not know how to approach this problem, like for start using servlet instead of butchering JSP

Yes, it is clear that i do not know how to tackle the issue as i'm new to the web languages. I'm still learning.

It is nice that you trying things on your own but in this case you better learn walking before you try to run. Get some good book like Head First Servlets & JSP which gives you good staring point and then try to tackle this sort of problem

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.