Re: Importing Text file via Query and Schema File
- From: John Nurick <j.mapSoN.nurick@xxxxxxxxxxxxxx>
- Date: Fri, 31 Mar 2006 21:28:23 +0100
Certainly one can use schema.ini with a query. Do you have
ColNameHeader=False
in the [TICBAL 02_2006.txt] (or whatever the filename is) section of
schema.ini?
Also, what do you mean by "I checked my schema.ini folder"? Schema.ini
must be in the same folder as the file you are importing.
On Fri, 31 Mar 2006 08:56:02 -0800, John
<John@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Ok that fixed the problem, but now when I execute the query I get another
error message saying Account_Nbr is an unknown field. I checked my
schema.ini folder and it is there. Here is the line from the schema file:
Col1=Account_Nbr Text Width 10
Could it be that you can't utilize a schema file when using a query?
"John Nurick" wrote:
Hi John,
I can't remember the details and can't test it here, but have you tried
enclosing the whole filename in brackets
...].[;].[TICBAL 02_2006#txt];
"John" <John@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:92296E7F-8CB0-4C37-AA7D-817D1E8EC7D5@xxxxxxxxxxxxxxxx
I am trying to import a text file into a table using an SQL query to pull
in
data from a text file without headers. I placed a schema.ini in the same
folder as the text file to define the columns. I tried the following
query I
found in another issue but I get an error message syntax error in FROM
clause. It seems to not like the # character. Any suggestions?
INSERT INTO MyTable
SELECT Account_Nbr
FROM [Text;HDR=No;Database=G:\FINANCIAL\Jacocella\Net
Margin\Analysis;].[TICBAL 02_2006]#txt;
--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.
.
- References:
- Re: Importing Text file via Query and Schema File
- From: John Nurick
- Re: Importing Text file via Query and Schema File
- Prev by Date: Re: How do I attach pdf and excel files to records/forms in Access?
- Previous by thread: Re: Importing Text file via Query and Schema File
- Next by thread: linking oracle to access
- Index(es):
Relevant Pages
|