cam503
cam503

Reputation: 11

Access SQL, importing txt files, delimitation

I have a question regarding Access queries. The below query will import data from a txt file into a new table. I have tested it, and it delimits by comma. Is there any way to change the delimitation character?

SELECT * INTO NewTable
FROM [Text;HDR=Yes;FMT=Delimited;Database=C:\Docs].Test.csv

Upvotes: 1

Views: 1010

Answers (1)

Gord Thompson
Gord Thompson

Reputation: 123689

Is there any way to change the delimitation character?

Yes. You can use a schema.ini file:

"When the Text driver is used, the format of the text file is determined by using a schema information file. The schema information file is always named Schema.ini and always kept in the same directory as the text data source. The schema information file provides the IISAM with information about the general format of the file, the column name and data type information, and several other data characteristics."

For the complete story see

Schema.ini File (Text File Driver)

Upvotes: 3

Related Questions