First, I want to thank everyone for some feedback they provided me a few weeks back on how to quickly read a flat-file – everything worked great.
My next goal is to do some cleaning of the records I have imported.
The data has been brought into a string array variable ( lets call it A(2000,3) )
- A(x,1) is Name
- A(x,2) is Location
- A(x,3) is Preference
I know that my data in A(x,1) contains several records for each name (duplicate names, different Location or Preference). I am wanting to output just the Unique names. I was going to run the ARRAY SORT feature on A(x,1) which would sort the data, and after that I was going to go through each record, one at a time, to see if the current record equaled the previous record read, if so, skip it – if not, output that Name and move on to the next record.
My question is.. Is this the best way? In Excel, I would have used a UNIQUE feature, but cannot seem to find an equiv feature in PBCC.
Thoughts???
John
My next goal is to do some cleaning of the records I have imported.
The data has been brought into a string array variable ( lets call it A(2000,3) )
- A(x,1) is Name
- A(x,2) is Location
- A(x,3) is Preference
I know that my data in A(x,1) contains several records for each name (duplicate names, different Location or Preference). I am wanting to output just the Unique names. I was going to run the ARRAY SORT feature on A(x,1) which would sort the data, and after that I was going to go through each record, one at a time, to see if the current record equaled the previous record read, if so, skip it – if not, output that Name and move on to the next record.
My question is.. Is this the best way? In Excel, I would have used a UNIQUE feature, but cannot seem to find an equiv feature in PBCC.
Thoughts???
John
Comment