BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Comparing Sets of Data

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi (General)
View previous topic :: View next topic  
Author Message
Aaron Gitlin
Guest





PostPosted: Wed Mar 03, 2004 10:30 pm    Post subject: Comparing Sets of Data Reply with 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


Back to top
Karel de Andere
Guest





PostPosted: Thu Mar 04, 2004 12:50 am    Post subject: Re: Comparing Sets of Data Reply with quote




"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





PostPosted: Thu Mar 04, 2004 6:32 am    Post subject: Re: Comparing Sets of Data Reply with 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

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





PostPosted: Thu Mar 04, 2004 10:59 am    Post subject: Re: Comparing Sets of Data Reply with quote


"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





PostPosted: Thu Mar 04, 2004 7:07 pm    Post subject: Re: Comparing Sets of Data Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi (General) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.