Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I import a CSV file into access 2

Status
Not open for further replies.

leonepaolo

Programmer
Joined
May 28, 2001
Messages
82
Location
CA
Hi!

From within access I'd like to use SQL to import all the records from a .csv file to a new table.

I'd really appreciate any directions or suggestions.

Thanks in advance,
Paolo.
 
Have a look at the DoCmd.TransferText method.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks, PHV. I knew that this was available *somewhere* and the Access help file was, as expected, useless...

Mike
Will BF1942 for food...
 
leonepaolo,
[tt]TransferText()[/tt] is the way to go, but if you really want to do it in SQL:
Code:
SELECT *, * INTO [i]NewTableName[/i]
FROM [i]SourceFileName[/i]#[i]csv[/i] IN [i]"TheFullPathToTheCSVFile[/i]\" "Text;FMT=Delimited;HDR=NO;IMEX=2;";

CMP

(GMT-07:00) Mountain Time (US & Canada)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top