• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Unique Items in a text file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Unique Items in a text file
      • From: Emmanuel <email@hidden>
  • Prev by Date: Maxing out a list
  • Next by Date: full screen vr moovie
  • Previous by thread: Re: maxing out a list
  • Next by thread: Re: Unique Items in a text file
  • Index(es):
    • Date
    • Thread