locked
Compare two CSV files and export to a third RRS feed

  • Question

  • User-1919799416 posted

    Is there any way to compare two csv files with LogParser and save the results to a new csv?

    I found this code for comparing of data from one CSV exists in another, but how would I check if the data is different?

    SELECT
        SamAccountName,
        LastLogonTimeStamp,
        WhenCreated,
        PasswordNeverExpires,
        AccountExpires,
        Description
    INTO
        finalnew.csv
    FROM
        new.csv
    WHERE
        SamAccountName NOT IN
        (SELECT SamAccountName
         FROM master.csv)

    Wednesday, April 2, 2014 5:33 PM

All replies

  • User212506688 posted

    Hi,

    I can't think of a simple solution for this one, but the idea I do have is that you take both files and store all the content into 2 seperate, but identical tables.  Then you can create a VIEW that contains only the data you want to see.  Then export that data to the location you want.

    HTH, Benjamin

    Thursday, June 26, 2014 3:36 AM