Importing text files into length specify parameters

N

N.Ordiers

Hi all,

I have forgotten how to import a string and tell how many character to
insert from the begging of the line into a specify column.

I think the code looks like this "INSERT INTO TableName (Field1(char 5),
Field 2(char 10))
"FROM TextFile"
 
M

Marshall Barton

N.Ordiers said:
I have forgotten how to import a string and tell how many character to
insert from the begging of the line into a specify column.

I think the code looks like this "INSERT INTO TableName (Field1(char 5),
Field 2(char 10))
"FROM TextFile"


Check the Mid function in Help to see if that's what you
want.
 
N

N.Ordiers

Thanks, but the file is outside of MS Access. I need to copy expecific number
of characters from each lines into defined fields in a MS Access table. I
have try using a schema.in but iti does not work for me. If you have any
idea of how I can accomplish the task, I will welcome it
 
M

Marshall Barton

If you can use File - Import (probably using the Advanced
features) to get the part of the text file containing the
characters you want into a field in some table, then we can
go from there.

If you can not use File - Import, then you will have to use
a sophisticated code procedure that intelligently parses the
text file to locate and extract the desired characters.
There's a class module that can be a big help at
http://www.mvps.org/access/modules/mdl0057.htm
but you will need to have expert coding skills if you can
not use File Import.
 

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

Top