Okay...let's begin with the basics...you being fairly new to Tekp-Tips, you should check out faq181-2886 and there are several threads floating around as to how you should format your question.
Now to the question at hand. You have two text files...one is 1.7G and is structured how? How many fields? Provide an example of one or two lines so we can see. You have a second file, approx 250M. Again what is the structure???
You want to compare the two and and find a match by order #, and save some of the fields but not all. Sound about right???
This can be done, although I would probably steer you away from a query or two and do this through VBA code. Reasoning: To use queries, you will have to import both files, and may very likely crash the db as it will go over the 2G limit.
You can do the following:
You would import the smaller file and then use VBA code to go through wach line of the larger file (which you did not import, don't worry, you can do this!) and look for a match in the smaller file. If a match is found, save the data you want into a new table. After you have gone through the large file you are done. The speed of this operation will vary on the actual number of lines (or records) in each file. Again, please provide some more information (Be as detailed as you can...input examples, output example, etc) and we will gladly help. Without more detailed info, I can't halp you more. ****************************
Only two things are infinite, the
universe and human stupidity, and
I'm not sure about the former.
(Albert Einstein)
Robert L. Johnson III
MCSA, CNA, MCP, Network+, A+
w: robert.l.johnson.iii@citigroup.com
h: wildmage@tampabay.rr.com