dbTalk Databases Forums  

algorithm to delimit a text file and import into database

comp.database.ms-access comp.database.ms-access


Discuss algorithm to delimit a text file and import into database in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
vindy
 
Posts: n/a

Default algorithm to delimit a text file and import into database - 02-12-2004 , 01:28 AM






Have a text file with tabular data like this. need to delimit the text
so I can import into a database. Please give some suggestions as how
to handle this.

0ACCT 2ND J.E. OFFSET
FY BEGIN YEAR TO DATE TOTAL BATCH
CTL DESCRIPTION DATE TC REF. REF. ACCOUNT
BALANCE ACTIVITY TO DATE REF. DATE
-1100 ** TOTAL CASH OWNERSHIP
71,101.28- 64,889.68 6,211.60-
03400 ** TOTAL RESTRICTD NON-APPROP
71,101.28 64,889.68- 6,211.60
04220 AEROMET 07/22 030 0351588
7,942.62- 4AR745 072203
AEROMET 07/22 030 0351588
45,263.45- 4AR745 072203
AEROMET 09/08 030 0352598
17,895.21- 4AR838 090803
AEROMET 09/25 030 0352995
2,730.10- 4AR889 092503
AEROMET 10/31 030 0353926
6,000.00- 4AR962 103103
4220 ** TOTAL FED GRANTS & CONTRTS
13,903.61- 79,831.38- 93,734.99-
09140 ** TOTAL CRF - REVENUE
100,000.00- 100,000.00-
09150 ** TOTAL CRF - EXPENSE
100,000.00 100,000.00
09540 ** TOTAL EXPENSE SUMMARY
85,004.89 14,941.70 99,946.59
09640 ** TOTAL ENCUMBRANCE SUMMARY
1,463.00 1,379.05- 83.95
- FUND BALANCE CHANGE



looks like the textbox corruputed the look of the file. please copy
and paste in wordpad to see actual format of the file. Thanks in
advance.

Reply With Quote
  #2  
Old   
Bruce Pick
 
Posts: n/a

Default Re: algorithm to delimit a text file and import into database - 02-14-2004 , 09:13 PM






Yikes. I did try pasting into WordPad and NotePad without any
improvement. I'd first make sure that you really do have a clean
delimited file.

Access will import many types of delimited files. With a destination
Access .mdb database open, click File - Get External Data - Import. In
"Files of Type", find your file type. If .txt, you'll get a dialog box
of options for decoding the delimited file.

If your installation of Access doesn't offer the possibilities you need,
try modifying the installation to a full one, rather than the default
with "usual" options.

Many times I've used Excel to clean up delimited files. Excel will save
as .txt or .csv and many other options, all of which can be imported
into Access.

Brude Pick
++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++
To send email, remove all < > and [ ] and the junk ~ between:
[brucepick1]
< a~t >
[comcast.net]



vindy wrote:
Quote:
Have a text file with tabular data like this. need to delimit the text
so I can import into a database. Please give some suggestions as how
to handle this.

0ACCT 2ND J.E. OFFSET
FY BEGIN YEAR TO DATE TOTAL BATCH
CTL DESCRIPTION DATE TC REF. REF. ACCOUNT
BALANCE ACTIVITY TO DATE REF. DATE
-1100 ** TOTAL CASH OWNERSHIP
71,101.28- 64,889.68 6,211.60-
03400 ** TOTAL RESTRICTD NON-APPROP
71,101.28 64,889.68- 6,211.60
04220 AEROMET 07/22 030 0351588
7,942.62- 4AR745 072203
AEROMET 07/22 030 0351588
45,263.45- 4AR745 072203
AEROMET 09/08 030 0352598
17,895.21- 4AR838 090803
AEROMET 09/25 030 0352995
2,730.10- 4AR889 092503
AEROMET 10/31 030 0353926
6,000.00- 4AR962 103103
4220 ** TOTAL FED GRANTS & CONTRTS
13,903.61- 79,831.38- 93,734.99-
09140 ** TOTAL CRF - REVENUE
100,000.00- 100,000.00-
09150 ** TOTAL CRF - EXPENSE
100,000.00 100,000.00
09540 ** TOTAL EXPENSE SUMMARY
85,004.89 14,941.70 99,946.59
09640 ** TOTAL ENCUMBRANCE SUMMARY
1,463.00 1,379.05- 83.95
- FUND BALANCE CHANGE



looks like the textbox corruputed the look of the file. please copy
and paste in wordpad to see actual format of the file. Thanks in
advance.

Reply With Quote
  #3  
Old   
Bruce Pick
 
Posts: n/a

Default Re: algorithm to delimit a text file and import into database - 02-15-2004 , 09:36 PM



Well, OK, MOST of which can be imported into Access.
Bruce
++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++
To send email, remove all < > and [ ] and the junk ~ between:
[brucepick1]
< a~t >
[comcast.net]


Bruce Pick wrote:
Quote:
Yikes. I did try pasting into WordPad and NotePad without any
improvement. I'd first make sure that you really do have a clean
delimited file.

Access will import many types of delimited files. With a destination
Access .mdb database open, click File - Get External Data - Import. In
"Files of Type", find your file type. If .txt, you'll get a dialog box
of options for decoding the delimited file.

If your installation of Access doesn't offer the possibilities you need,
try modifying the installation to a full one, rather than the default
with "usual" options.

Many times I've used Excel to clean up delimited files. Excel will save
as .txt or .csv and many other options, all of which can be imported
into Access.

Brude Pick
++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++
To send email, remove all < > and [ ] and the junk ~ between:
[brucepick1]
a~t
[comcast.net]



vindy wrote:

Have a text file with tabular data like this. need to delimit the text
so I can import into a database. Please give some suggestions as how
to handle this.

0ACCT 2ND J.E. OFFSET
FY BEGIN YEAR TO DATE TOTAL BATCH
CTL DESCRIPTION DATE TC REF. REF. ACCOUNT
BALANCE ACTIVITY TO DATE REF. DATE
-1100 ** TOTAL CASH OWNERSHIP
71,101.28- 64,889.68 6,211.60-
03400 ** TOTAL RESTRICTD NON-APPROP
71,101.28 64,889.68- 6,211.60
04220 AEROMET 07/22 030 0351588
7,942.62- 4AR745 072203
AEROMET 07/22 030 0351588
45,263.45- 4AR745 072203
AEROMET 09/08 030 0352598
17,895.21- 4AR838 090803
AEROMET 09/25 030 0352995
2,730.10- 4AR889 092503
AEROMET 10/31 030 0353926
6,000.00- 4AR962 103103
4220 ** TOTAL FED GRANTS & CONTRTS
13,903.61- 79,831.38- 93,734.99-
09140 ** TOTAL CRF - REVENUE
100,000.00- 100,000.00-
09150 ** TOTAL CRF - EXPENSE
100,000.00 100,000.00
09540 ** TOTAL EXPENSE SUMMARY
85,004.89 14,941.70 99,946.59
09640 ** TOTAL ENCUMBRANCE SUMMARY
1,463.00 1,379.05- 83.95
- FUND BALANCE CHANGE



looks like the textbox corruputed the look of the file. please copy
and paste in wordpad to see actual format of the file. Thanks in
advance.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.