PC Review


Reply
Thread Tools Rate Thread

Comparing 2 pipe-delimited text files

 
 
sgcanning@gmail.com
Guest
Posts: n/a
 
      17th May 2007
Hi,
I am trying to compare two pipe-delimited text files which have been
exported from an Access database.
Thing is that I need to compare each record by the primary key
(CodeNumber) and if there are differences then I need to put the
different record into another text file.
Can anyone help me with this? I keep getting told that this would be
easy, but I have very limited experience with coding.
Thank you in advance for your attention and any help that you can give
me.
Sean

 
Reply With Quote
 
 
 
 
Harlan Grove
Guest
Posts: n/a
 
      18th May 2007
sgcann...@gmail.com wrote...
>I am trying to compare two pipe-delimited text files which have
>been exported from an Access database.
>Thing is that I need to compare each record by the primary key
>(CodeNumber) and if there are differences then I need to put the
>different record into another text file.
>Can anyone help me with this? I keep getting told that this would
>be easy, but I have very limited experience with coding.

....

Is there any good reason you're not comparing the tables from which
these text files were generated in Access? Generating the records in
one of the other table with no matching key field in the other table
involves only an outer join on the key fields with the criteria for
the key field for the table matched against being NULL.

SELECT tbl1.*
FROM tbl1 LEFT JOIN tbl2 ON tbl1.key = tbl2.key
WHERE (((tbl2.key) Is Null));

produces a table containing records in tbl1 with no matching key field
in tbl2, and

SELECT tbl2.*
FROM tbl1 RIGHT JOIN tbl2 ON tbl1.key = tbl2.key
WHERE (((tbl1.key) Is Null));

produces a table containing records in tbl2 with no matching key field
in tbl 1.

You could do this manually in Excel, importing each file into separate
worksheets, parsing them into fields, then using formulas like

X2: =COUNT(MATCH(A2,INDEX(OtherImportedParsedFile,0,1),0))

filled down for each record in the respective worksheets, then
autofiltering each worksheet on that column of formulas.

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I convert tab delimited files to pipe delimited? =?Utf-8?B?SmVyZW15IFRvd24=?= Microsoft Excel Misc 2 15th Nov 2007 04:29 PM
Pipe-delimited files into access db normalit@gmail.com Microsoft Access External Data 2 10th Oct 2006 09:26 AM
Pipe Delimited files with headers normalit@gmail.com Microsoft Access External Data 2 7th Sep 2006 09:36 PM
Pipe and comma delimited files =?Utf-8?B?TWFsY29sbSBNb3Jhbg==?= Microsoft Access External Data 1 15th Nov 2004 11:17 PM
Pipe Delimited Importing Text Files G. Fernandez Microsoft Excel Worksheet Functions 0 31st Jul 2003 08:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:45 PM.