Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Deleting rows from txt files

Author  Topic 

bwagner
Starting Member

1 Post

Posted - 2009-01-07 : 14:41:27
I'm not really sure how to go about this project, so I thought I'd throw it out there.

I have two .txt files that are stored in csv format. The first file is set up as:

PhoneNumber1,PhoneNumber2,FirstName,LastName,AccountNumber

Then the second file is set up like this:

AccountNumber,FirstName,LastName


What I'm looking to do is any time an account number from File 2 matches an account number from File 1, to have that row removed from File 1. I need for the file to stay saved as a csv .txt file. Please let me know if this is possible, and how to go about tackling this problem.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-01-07 : 14:42:58
Are you using a SQL Server database? I don't see SQL Server mentioned in the thread. If you are using SQL Server, then you could use SSIS, however since you are only dealing with files, a VBScript might be easiest.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -