[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Compare two flat files



Maria:

You could create two temporary tables (Inserts) to store the data from each
file.
pseudocode:

while not end of file,
  read from each file and unstring().
  For each read peform an insert into the respective temp table
then
  do your comparision for what you are looking for in table_b in table_a
with exists()

  begin-procedure ScanTable_b
  Move 0 to #found
  begin-select
      Let #found = 1
  from table_b b
      where
          exists(...) !or not exists() as the case may be...
  end-select
  end-procedure

begin-procedure ScanTable_a
begin-select
<your fields...>
  Do ScanTable_b
  if (#found)
    Do Something !<your implementation-specific details here>
  end-if
from
  table_a a

end-select
end-procedure

begin-program
  Do ScanFiles !inserts into temp tables
  Do ScanTable_a
end-program

Dietrich


Dietrich T. Schmitz
Customer Support Rep. IMT UMAS
Upstate Medical University
(315) 464-8897
schmitzd@upstate.edu

>>> Doug.Savage@ACXIOM.COM 04/23/02 11:38AM >>>
If they are not too big(very subjective), I would suggest reading them
both
in, do the comparison, then write what is needed.


-----Original Message-----
From: Brickl, Maria [mailto:mbrickl@UWC.EDU]
Sent: Tuesday, April 23, 2002 10:27 AM
To: SQR-USERS@list.iex.net
Subject: Compare two flat files


Does anyone know if it is possible to compare two flat files to create a
new
flat file of rows that are in one of the flat files but not in the other?

*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
Maria K Brickl
Information Systems Programmer/Analyst
University of Wisconsin Colleges
780 Regent St, PO Box 8680, Madison, WI  53708-8680
Phone: 608.265.2677 / Fax: 608.265.5770
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*


********************************************************************

The information contained in this communication is
confidential, is intended only for the use of the recipient
named above, and may be legally privileged.
If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination,
distribution, or copying of this communication is strictly
prohibited.
If you have received this communication in error,
please re-send this communication to the sender and
delete the original message or any copy of it from your
computer system. Thank You.