Removing Duplicate Rows OpenOffice.org Calc using MySql Database

Removing Duplicate Rows OpenOffice.org Calc using MySql Database.

 

First Select column form Calc and save as .csv
Select column then save file as..  choose Text CSV (.csv) 
- select options Edit filter settings

Field separator : {Empty}
Text separator  :

Text separator is empty.. or just space

 

Login (unix shell) in to MySql

# mysql -u root -p

# Then create MySql database importdata

mysql>CREATE database importdata;

mysql>use importdata;

# Create table remove_double

CREATE TABLE `remove_double` (
  `data` varchar(100) NOT NULL,
  UNIQUE KEY `data` (`data`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;

# copy your .csv file on the server and use commando

 

LOAD DATA LOCAL INFILE "/root/Remove_double.csv" INTO TABLE remove_double;

or try

LOAD DATA LOCAL INFILE "/root/Remove_double.csv" INTO TABLE remove_double LINES TERMINATED BY '\r';

End result is: total records 9598, double not imported / skipped : 54, imported 9544 rows.

Now you can export data with Webmin, or phpMyAdmin  as .csv (CSV without quotes)
Export destination, Display in browser or Save to file .. and copy back to your OpenOffice.org Calc.

 

Bespaar continu