| View previous topic :: View next topic |
| Author |
Message |
Aaron Gitlin Guest
|
Posted: Wed Mar 03, 2004 10:30 pm Post subject: Comparing Sets of Data |
|
|
Hello all -
I have two sets of data in text files - both set of data are phone numbers.
I need to find like phone numbers in each file and return them. What are
your opinions on the best way to do this? I was thinking either client data
sets or some sort of nasty string compare loop.
Any ideas?
Thanks in advance!
Aaron
|
|
| Back to top |
|
 |
Karel de Andere Guest
|
Posted: Thu Mar 04, 2004 12:50 am Post subject: Re: Comparing Sets of Data |
|
|
"Aaron Gitlin" <aaron (AT) accent-networks (DOT) com> schreef in bericht
news:S7udnVuKM-YKwdvdRVn-hw (AT) mpowercom (DOT) net...
| Quote: | Hello all -
I have two sets of data in text files - both set of data are phone
numbers.
I need to find like phone numbers in each file and return them. What are
your opinions on the best way to do this? I was thinking either client
data
sets or some sort of nasty string compare loop.
Any ideas?
Thanks in advance!
Aaron
|
Perhaps you could read them as strings (TStrings.LoadFromFile), sort them,
walk through the shortest list and do a binary search on the other.
|
|
| Back to top |
|
 |
Aaron Gitlin Guest
|
Posted: Thu Mar 04, 2004 6:32 am Post subject: Re: Comparing Sets of Data |
|
|
Thanks for the feedback Karel. That was one of my options. These text files
are HUGE. We're talking 80K records. Hopefully the process won't take 8
years!
-=)
"Karel de Andere" <kdan (AT) slimvisje (DOT) nl> wrote
| Quote: |
"Aaron Gitlin" <aaron (AT) accent-networks (DOT) com> schreef in bericht
news:S7udnVuKM-YKwdvdRVn-hw (AT) mpowercom (DOT) net...
Hello all -
I have two sets of data in text files - both set of data are phone
numbers.
I need to find like phone numbers in each file and return them. What
are
your opinions on the best way to do this? I was thinking either client
data
sets or some sort of nasty string compare loop.
Any ideas?
Thanks in advance!
Aaron
Perhaps you could read them as strings (TStrings.LoadFromFile), sort them,
walk through the shortest list and do a binary search on the other.
|
|
|
| Back to top |
|
 |
Karel de Andere Guest
|
Posted: Thu Mar 04, 2004 10:59 am Post subject: Re: Comparing Sets of Data |
|
|
"Aaron Gitlin" <aaron (AT) accent-networks (DOT) com> schreef in bericht
news:ydmdnZuBE_XyUNvdRVn-hg (AT) mpowercom (DOT) net...
| Quote: | Thanks for the feedback Karel. That was one of my options. These text
files
are HUGE. We're talking 80K records. Hopefully the process won't take 8
years!
-=)
"Karel de Andere" <kdan (AT) slimvisje (DOT) nl> wrote in message
news:40467ce5$0$562$e4fe514c (AT) news (DOT) xs4all.nl...
"Aaron Gitlin" <aaron (AT) accent-networks (DOT) com> schreef in bericht
news:S7udnVuKM-YKwdvdRVn-hw (AT) mpowercom (DOT) net...
Hello all -
I have two sets of data in text files - both set of data are phone
numbers.
I need to find like phone numbers in each file and return them. What
are
your opinions on the best way to do this? I was thinking either
client
data
sets or some sort of nasty string compare loop.
Any ideas?
Thanks in advance!
Aaron
Perhaps you could read them as strings (TStrings.LoadFromFile), sort
them,
walk through the shortest list and do a binary search on the other.
|
Then consider FileStreams instead of Strings. But then all the records have
to be of the same size and you have to implement a sort method yourself.
|
|
| Back to top |
|
 |
Aaron Gitlin Guest
|
Posted: Thu Mar 04, 2004 7:07 pm Post subject: Re: Comparing Sets of Data |
|
|
Gotcha.
Thank you very much for your help, Karel!
-A
"Karel de Andere" <kdan (AT) slimvisje (DOT) nl> wrote
| Quote: |
"Aaron Gitlin" <aaron (AT) accent-networks (DOT) com> schreef in bericht
news:ydmdnZuBE_XyUNvdRVn-hg (AT) mpowercom (DOT) net...
Thanks for the feedback Karel. That was one of my options. These text
files
are HUGE. We're talking 80K records. Hopefully the process won't take 8
years!
-=)
"Karel de Andere" <kdan (AT) slimvisje (DOT) nl> wrote in message
news:40467ce5$0$562$e4fe514c (AT) news (DOT) xs4all.nl...
"Aaron Gitlin" <aaron (AT) accent-networks (DOT) com> schreef in bericht
news:S7udnVuKM-YKwdvdRVn-hw (AT) mpowercom (DOT) net...
Hello all -
I have two sets of data in text files - both set of data are phone
numbers.
I need to find like phone numbers in each file and return them.
What
are
your opinions on the best way to do this? I was thinking either
client
data
sets or some sort of nasty string compare loop.
Any ideas?
Thanks in advance!
Aaron
Perhaps you could read them as strings (TStrings.LoadFromFile), sort
them,
walk through the shortest list and do a binary search on the other.
Then consider FileStreams instead of Strings. But then all the records
have
to be of the same size and you have to implement a sort method yourself.
|
|
|
| Back to top |
|
 |
|