Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- srinivas thanneeru
February 16, 2014, 11:01 am
rate this thread
I have table called student_marks, i want to update the marks of student from csv file into database, how can i do that using LOAD DATA INFILE.
Expected : For all students in the database marks has to be updated,those who are not in the database marks should not be updated.
I tried this :
LOAD DATA INFILE '" + saveFile + "'REPLACE INTO TABLE temp1 FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\n' (StudentId,StudentName,marks)";
but all the people in the csv has been added to the database,i need update the marks of students who were already in the database.
can any one helps here..
Appreciate your time.
- » Mac Script to search and print lines in all text files.
- — Next thread in » MySQL Database Forum
- » ERROR 1148 (42000): The used command is not allowed with this MySQL version
- — Previous thread in » MySQL Database Forum
- » Americanas.com SALDO de TVs Com at 80% de Desconto (29798)
- — Newest thread in » MySQL Database Forum