Merge two csvs

This topic contains 2 replies, has 2 voices, and was last updated by  GoogleUser20 3 years, 1 month ago.

  • Author
  • #22572


    I have two CSV files which share one column called database in common. I am looking to merge both CSVs into one. Here is a summary of what I am looking for.


    Database Size freespace
    DB1 100 50
    DB2 80 55
    DB3 90 40


    Database MBXCount WhiteSpace
    DB1 20 50
    DB2 100 2
    DB3 50 9

    Desired file

    Database Size freespace MBXCount WhiteSpace
    DB1 100 50 20 50
    DB2 80 55 100 2
    DB3 90 40 50 9

    Any help would be appreciated.

  • #22573

    Dave Wyatt

    The PowerShell team made a blog post on this a couple years ago: [url=""]Join-Object[/url]. As long as your set size is not too huge, it works great. (It doesn't scale well; very slow when you're trying to merge thousands of records.)

  • #22636


    Thanks for the feedback. I actually went with merge-csv function. It did what I was looking for.

You must be logged in to reply to this topic.