Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1326.Advanced search and replace -- How to substract one csv file from another according to value of column A?

User: Michelle Lyles -- 2015-11-21          << 1325  1327 >>
Hits: 2841
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
I have two csv files (each file contains about 6000 rows and 20 columns).  One file is a database of products from the August Catalog.  The other file is a database of products from the November Catalog.  Column A of both files contains product sku numbers.  I would like to subtract the August Catalog from the November Catalog.  The resulting csv file will contain only new products.  
Input Sample:
August, Catalog: 
SKU, NAME, DESCRIPTION 
123, name1, html-1 
456, name2, html-2 
Aa456, name3, html-3 
Aa789, name4, html-4 
aa-123, name5, html-5 
aa-456, name6, html-6 
 
November, Catalog: 
SKU, NAME, DESCRIPTION 
789, new1, html-a 
123, name1, html-1 
456, name2, html-2 
Aa456, name3, html-3 
new123, new2, html-b 
Aa789, name4, html-4 
aa-123, name5, html-5 
aa-456, name6, html-6 
new-001, name, html-c
Output Sample:
New Product Catalog: 
SKU    NAME  DESCRIPTION 
789    new1  html-a 
new123 new2  html-b 
new-001 name html-c 
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
Assume two files are, they are comma separated. 
d:\test\Nov.csv 
d:\test\Aug.csv 
1. ctrl-o open Nov.csv 
2. ctrl-h open 'replace' dialogue 
* set 'replace unit' to 'Line' 
* set 'If' to: 
 
* click 'advanced' tab, set 'run following at the beginning of replace' to: 
 
3. click 'replace', done. 
4. ctrl-s save to file. 
 
Note: in step 2 file folder separater should be double backslash like d:\\test\\Aug.csv. 

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Advanced_Window


Similar Examples:
How to split a csv file according to the value of column A? (78%)
How to split a CSV file with Header according to value of  column B? (75%)
How to split a CSV file with Header according to value of a column? (75%)
How to split a csv file into multiple files according to value of column B? (72%)
How to extract column X from csv file where X is decided by column A? (63%)
How to sort lines of text file by comparing the sum of column1, 2 and 3? (61%)
How to batch sort csv files by the order of value in the specified column? (60%)
How to sort csv files by two or more columns? (59%)

Check Demo of Advanced search and replace
Keywords:
subtract  substr  600  database  about  two files  backslash  double  slash  csv files  only numbers  double words  contains numbers  only one column  two columns match  replace comma tab  two words  replace double files and replace