473,395 Members | 1,516 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,395 software developers and data experts.

Import (1) Text File with (3) different Header Records (3)Different Tables

31
I am not sure on how I should approach this. I know a loop but I am a newbee on this..I have one file that contains 3 seperate header records that contain data under each header.
(AA AA) (AA BB) (AA CC)
What I want to do is loop thru the data under each header data. I am using ACCESS 2000 and have import Specs for each one.
(AA AA)Data in (Table1) and
(AA BB)DATA in (Table2) and
(AA CC)Data in (Table3)
The input file will have the header records in sequence.. So I just need to find AA AA all the data until it finds AA BB then AA CC.

Thanx
Wayne L
Nov 15 '10 #1
2 2057
TheSmileyCoder
2,322 Expert Mod 2GB
Its hard to grasp what your data looks like, but from what I see, I would suggest:

Import the whole file to a table.
Run a Insert Into query, selecting the fields you want, into table 1, and so on.

If this for some reason does not work, im sure we can come up with a loop, but please present some sample data as accurately as possible.
Nov 16 '10 #2
Wayne L
31
Below i have bolded and underlined what I want to key on with the loop..
Currently I have set up three differenent tables to import them into and add some missing data and append to the correct format for export. The file has to stay in its current state with no changes except for the card colums. It is currently working in my current DB but would like to take this one file and import to their seperate tables instead of breaking them up into 3 seperate files before import. Thanks for your time looking at this..

1LXF3441A OB MONTHLY FILLED ORDER/EXPENDITURE DIFFERENCE LISTING FOR 10-2010 PAGE 4407
0 40540 4582AR 11 1804 60CC

FY 11 APPN 1804 SBHD 60CC OB 4582A SX R C-UIC 40540 OFC CCG/SEGT 1
0 DOCUMENT NO ACRN JOB ORDER TL NO ID BILL/VO NO UI COG STOCK NUMBER EXEC QTY AMT REMARKS
ISS ACT FSC NIIN CODE

V405400274PW11 AA 137LCA 006 EA FY-11 PWC CRA OBL 97978 66,000.00
V405400274PW11 AA 137LCA D36 100 6022200 EA FY-11 PWC CRA EXP 0 1,753.96 MATCHED EXP
.00 DIFFERENCE
64,246.04 PT ORD EST

V405400279R200 AA 1343CA 001 EA 4235015698792 OBL 1 3,347.86
V405400279R200 AA 1343CA SMS 100 U0BL7 EA 4235015698792 EXP 1 3,955.33 MATCHED EXP
607.47 DIFFERENCE

V405400287B300 AA 134ECA 002 EA 4235015698792 OBL 2 6,695.72
V405400287B300 AA 134ECA SMS 100 U0IIU EA 4235015698792 EXP 2 7,910.66 MATCHED EXP
1,214.94 DIFFERENCE

V405400287S002 AA 132ECA 002 SL 4020002460688 OBL 53 4,056.62
V405400287S002 AA 132ECA NUA 100 U2347 SL 4020002460688 EXP 53 4,056.62 MATCHED EXP
.00 DIFFERENCE

V405400287S003 AA 132KCA 003 HD 5975004515001 OBL 180 797.40
V405400287S003 AA 132KCA NUA 100 U2349 HD 5975004515001 EXP 180 797.40 MATCHED EXP
.00 DIFFERENCE
1LXF3441A OB MONTHLY FILLED ORDER/EXPENDITURE DIFFERENCE LISTING FOR 10-2010 PAGE 2114
0 40540 4582AR 10 1804 60CC

FY 10 APPN 1804 SBHD 60CC OB 4582A SX R C-UIC 40540 OFC CCG/SEGT 1
0 DOCUMENT NO ACRN JOB ORDER TL NO ID BILL/VO NO UI COG STOCK NUMBER EXEC QTY AMT REMARKS
ISS ACT FSC NIIN CODE

V405400116S810 AA 0332B1 062 EA JON 332B PGI OBL 1 150.80
V405400116S810 AA 0332B1 062 EA JON 332B PGI OBL 1 99,995.80
V405400116S810 AA 0332B1 D05 100 0JFFF1I EA JON 332B PGI EXP 1 99,995.80 MATCHED EXP
.00 DIFFERENCE
150.80 PT ORD EST

V405400125PC01 AA 0372F5 062 EA JON 372F CHAN OBL 1 1,439.89
V405400125PC01 AA 0372F5 D05 100 0JFFF1I EA JON 372F CHAN EXP 1 1,439.89 MATCHED EXP
.00 DIFFERENCE

1LXF3441A OB MONTHLY FILLED ORDER/EXPENDITURE DIFFERENCE LISTING FOR 10-2010 PAGE 2114
0 40540 4582AR 10 1804 60CC

FY 09 APPN 1804 SBHD 60CC OB 4582A SX R C-UIC 40540 OFC CCG/SEGT 1
0 DOCUMENT NO ACRN JOB ORDER TL NO ID BILL/VO NO UI COG STOCK NUMBER EXEC QTY AMT REMARKS
ISS ACT FSC NIIN CODE

V405400116S809 AA 0332B1 062 EA JON 332B PGI OBL 1 150.80
V405400116S809 AA 0332B1 062 EA JON 332B PGI OBL 1 99,995.80
V405400116S809 AA 0332B1 D05 100 0JFFF1I EA JON 332B PGI EXP 1 99,995.80 MATCHED EXP
.00 DIFFERENCE
150.80 PT ORD EST

V405400125PC01 AA 0372F5 062 EA JON 372F CHAN OBL 1 1,439.89
V405400125PC01 AA 0372F5 D05 100 0JFFF1I EA JON 372F CHAN EXP 1 1,439.89 MATCHED EXP
.00 DIFFERENCE

V405400130HZ01 AA 0373C5 062 EA JON 373C - HA OBL 97978 10,000.00
V405400130HZ01 AA 0373C5 D36 100 6022400 EA JON 373C - HA EXP 0 1,414.23 MATCHED EXP
.00 DIFFERENCE
8,585.77 PT ORD EST
Nov 16 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: DF | last post by:
Hello, We have a query which returns ~2.8 million rows. This same query is used in a DTS package, which exports to a text file. The number of rows in this text file, however, is ~2.7 million...
4
by: Kevin Forbes | last post by:
Hi there, When importing a text file using SQL Server, how do I specify the path to a file on the same remote server that SQL Server is running on? I tried //c:/filename but that doesn't seem to...
4
by: news | last post by:
Our production database in an exported textfil runs about 60 MB. Compressed that's about 9 MB. I'm trying to import the export into another machine running FC3 and mySQL 11.18, and it appears as...
2
by: Raghavendra Mahuli | last post by:
Hello, I have a text file in which records are stored in a particular format. For ex: Node1( att1, att2, node2(attx)) I need to convert it to xml. I know xsl can be used to convert *xml to*...
3
by: Krish | last post by:
I have requirement, that i get one big chunk of text file. This text file will have has information, that on finding "****End of Information****", i have to split them individual text file with our...
3
by: Daron | last post by:
I am using this command to import text file: DoCmd.TransferText acImportDelim, str_SpecName, str_TblName, str_FileName, False - The import will always be missing the first line in the text...
3
by: tjuiowa | last post by:
Hi I am trying to import a text file into a MS Access database. The first 11 lines of the text file are in a different format, so i would like to skip those lines and start at line 12. is there...
3
by: voroojak | last post by:
I have a bog problem in access what i have to do is that i have a text file that i have to insert it into access. but the problem is that there is two differnt type of data in my text file. the...
1
by: nussu | last post by:
Hi, I have two pages. First page is login.aspx,second is deatils.aspx. When i enter different credentials in loginpage i need to get different headers in details.aspx page. For example if i...
6
by: =?Utf-8?B?emFsZHk=?= | last post by:
Hi! I have a question.. How can csharp read a text file and execute it in another application? What I mean is that, Im doing a drawing using Tekla Structures. But instead of doing the same...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.