Data Comparison for dups

  • Hi,

    Here is the issue that I am trying to resolve.  I have a spreadsheet that has names and addresses.  I would like to compare the first and last names with records in a sql database, and I would like to automate this process.  I am looking for guidance of how best to resolve this issue.  I am thinking I probably need to use a combination of DTS and Stored procedures, but I am not sure that is the best way.  Any and all details are helpful.

    Thanks

    KR

  • Import the XLS in a SQL server table. Then use SQL Data Compare (www.red-gate.com) to compare the data.

  • I am looking more in terms of building something myself to do the comparison - at this time just the first and last names. 

    KR

  • I think DTS should work fine with this... I have done something like this earlier and I used DTS with different compare and update sql scripts... Good luck!

  • If it's just 1 simple process, of a single spreadsheet, you can do it all in T-SQL using OpenRowSet:

    SELECT *

    INTO ExcelDataCopy

    FROM  OPENROWSET('Microsoft.Jet.OLEDB.4.0',

       'Excel 8.0;Database=c:\YourServerFolder\YourFile.xls', [Sheet1$])

    You now have a copy of the excel data in a table named [ExcelDataCopy] and can join it as necessary to other tables in your database.

     

  • Thanks You all!  You given me a good starting point to work on!

    KR

     

     

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply