473,394 Members | 1,663 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

need ideas on approach

RC

--------------------------------------------------------------------------------

All,

Need ideas on how to approach this:

Have to compare account numbers in one table to account numbers in
another table and if they exist in the second table

The problem is the tables are in two separate databases (two different
physical places). One table in the ERP system and the other is in the
financial system.

table1 ERP system
table2 Financial system

1. Should I dump table 1 into dataset table, do the same with table
two. This way they are both in the same dataset then figure out how to
compare 1 to 2?

2. Do I dump table 1 into an array and iterate through the array
making sql calls (using a data reader) to see if the account numbers
exist in second table?

3. Put both tables in the arrays and hack away?

What do you consider a good approach or best practice?
Thanks in advance
RC

Nov 17 '05 #1
1 1030
If all you need to test for is existence, read the second table and
hash the account numbers in a Hashtable. You can make both the key and
the value the account number. Then read the first table and check each
account number against the hash table. Or, if you need to cross-check,
read each table into a separate Hashtable, and iterate through each
Hashtable, checking the keys against the other Hashtable.

A Hashtable will give you a compact representation and easy lookup.
It's also fast, although after both database reads the in-memory lookup
speed will be inconsequential no matter what data structure you use.
Hashtable wins just for being easier.

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jaime Wyant | last post by:
*long post alert!* Can anyone give me some pointers on writing "self-updating" python programs? I have an application that is almost ready for beta testing. I want to be able to fix any bugs...
14
by: Onideus Mad Hatter | last post by:
Well in theory it was a good idea: http://www.backwater-productions.net/_test_platform/game/index.html Press "4" to move left, press "6" to move right. The question remains though...is there...
11
by: darcykahle | last post by:
I have stumbled upon an interesting issue with regard to compaction of an access frontend database which resides on a DFS target that utilizes FRS to mirror the sharepoint, and I was wondering if...
10
by: Tom | last post by:
I am looking for some ideas for how to design the layout of the form for data entry and to display the data for the following situation: There are many sales associates. A sales associate can work...
10
by: Luke Meyers | last post by:
So, just a little while ago I had this flash of insight. It occurred to me that, while of course in general there are very good reasons for the conventional two-file header/implementation...
43
by: SLH | last post by:
hi people. im trying to validate input received via a text area on an ASP page before writing it to a database. i cant use client side javascript due to policy, so it all has to happen on the...
27
true911m
by: true911m | last post by:
I would like to solicit your thoughts and ideas (code can come later) about how you would approach a project idea I just tossed together. I chose this as a testbed for me to play with objects,...
2
by: Anders B | last post by:
I want to make a program that reads the content of a LUA array save file.. More precicely a save file from a World of Warcraft plugin called CharacterProfiler, which dumps alot of information about...
1
by: Bob Alston | last post by:
Looking for design approach ideas for collecting data from multiple remote, standalone databases. I have built one of these in Access. Another I am told was built in Access. some others the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.