Unique Items in a text file
Unique Items in a text file
- Subject: Unique Items in a text file
- From: Steve Thompson <email@hidden>
- Date: Mon, 08 Apr 2002 12:27:01 +0000
On a daily basis I receive a text file that contains a large number of tab
delimited records. In each record, field 8 contains a product code.
I have written a script that loops through each line of data, looks at field
8, compares it with a list of product codes and, if the product code isn't
in the list, it adds it.
The idea being that at the end of the file, I have a list of unique product
codes from that data file - about 25 items.
If I had access to an SQL database, I could just import the data into a
table and do a "SELECT ALL UNIQUE product_code FROM import" which would take
a fraction of a second and have the same result as my script.
Does anyone know of a better way to achieve this list of unique values
either by script or using an OSAX or external application? As the number of
records increases in the text file, the script takes longer and longer.
Thanks in advance,
Steve
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.