Help with importing .dat file

  • Thread starter Thread starter Rnt6872
  • Start date Start date
R

Rnt6872

Hello All,
I have a file that I retrieve like this:


7102702007010822222220656017000840314RDSSAL00000011351770610010059900
7102702007010822222220656995000840314RDSSAL00000060077510610010010000
7102702007010822222220657588000840314RDSSAL00000060014810610010079900
7102702007010822222220658315000840314RDSSAL00000026967970610010057500
7102702007010822222220659950000840314RDSSAL00000083792400610010089900

I know the number of spaces that denotes each field. I needsome help
with a way to import the data into a database table.

Thank you.
 
Depending on how big the file is, you may want to try importing it into
Excel first for the column width settings and then import the Excel
file into access. Won't work if you have more than 65K records, though.

MikeB
 
Rnt6872 said:
Hello All,
I have a file that I retrieve like this:


7102702007010822222220656017000840314RDSSAL00000011351770610010059900
7102702007010822222220656995000840314RDSSAL00000060077510610010010000
7102702007010822222220657588000840314RDSSAL00000060014810610010079900
7102702007010822222220658315000840314RDSSAL00000026967970610010057500
7102702007010822222220659950000840314RDSSAL00000083792400610010089900

I know the number of spaces that denotes each field. I needsome help
with a way to import the data into a database table.

You probably need to rename the file (or copy it) to a .txt extension.
Then you can use menu item File -> Get External Data -> Import... to
open the Import dialog, specify files of type "Text Files", choose your
file, and click the Import button. That will start the Import Text
Wizard, and there you can specify that it's a fixed-width file and
proceed to mark out the fields. If you're going to be importing the same
format again, you may want to click the Advanced... button and save the
import specification so that you can use it again.

Does that give you enough info to get you going?
 
Dirk said:
You probably need to rename the file (or copy it) to a .txt extension.
Then you can use menu item File -> Get External Data -> Import... to
open the Import dialog, specify files of type "Text Files", choose your
file, and click the Import button. That will start the Import Text
Wizard, and there you can specify that it's a fixed-width file and
proceed to mark out the fields. If you're going to be importing the same
format again, you may want to click the Advanced... button and save the
import specification so that you can use it again.

I do it this way all of the time, never had a problem AFAIK a .dat is
no different from a .txt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top