Archive for the ‘sql’ Category

mySQL csv import via LOAD DATA INFILE

Well it’s actually quite simple. That sample worked for me like a charm: LOAD DATA INFILE “C:\\\\us_mag_sizes.csv” INTO TABLE support_sizes_US FIELDS TERMINATED BY “,” OPTIONALLY ENCLOSED BY “””” LINES TERMINATED BY “\r\n” IGNORE 1 LINES LOAD DATA INFILE “C:\\\\time_pojas.csv” INTO TABLE pt_time FIELDS TERMINATED BY “,” OPTIONALLY ENCLOSED BY “””” LINES TERMINATED BY “\r\n” IGNORE […]

Posted on February 11, 2010 at 18:33 by admin · Permalink · Leave a comment
In: English, sql

How to find duplicated values in MySQL (or/and probably any other RDBM)

As an example I take one real (almost) table I have in my db. Structure is very simple : Table name: “words”, field “filename” name of the file and “words” just some information about each file. +—————–+———————+ |   filename     |     words         | +—————–+———————+ Suddenly we had a few files with exactly same name and […]

Posted on February 16, 2009 at 14:55 by admin · Permalink · Leave a comment
In: English, sql · Tagged with: , ,