Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

CVS Data from multiple files

$
0
0

I am trying to append a column to a csv file that references a second csv file, using a matching column header in both files.  

The matching column in both files is UserID, for example.

File 1 - contains multiple columns, minus an email address.  The same user ID appears in multiple rows, with differing data in other columns.

File 2 - contains only UserID & email address, and each user ID appears only once.

Basically, I need to take the UserID from file 1, match it in file 2, copy the corresponding email address in file 2 and append back it to file 1 in a new column (often multiple times for the same UserID)

The data cannot be referenced in AD, only from the csv files.

I have tried building a data dictionary based on file 1 and cycling though file 2 looking for matches, but it fails due to the duplicate rows in file 1.

I appreciate any guidance on this.



howbs


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>