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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Defining fields in an ascii file in SQL?

Status
Not open for further replies.

Dan01

Programmer
Jun 14, 2001
439
US
Hi, I have an ascii file I'd like to load into an access database table. How would one define the fields in the file in SQL? Example record: 1234John Wayne555.

NumberID, 1,4
Name, 5,14
PurchaseID, 19,3

Once these fields are defined, I wish to use SQL CREATE TABLE with NumberID,Name,PurchaseID fields, then load that table using the file. Please help, Thanks, Dan.
 
Create the table, first.

Right click in the Tables window and select Import. Let the wizard guide you through the choices. Use advanced options to set the text file field lengths. Let the import run.

I recommend using an Access fourm for Access questions. The ANSI SQL forum focuses on ANSI SQL not the operations os a particualr RDMS. For example, see forum181. Terry L. Broadbent
Programming and Computing Resources
 
I believe this is more a SQL question then an access question. The file load into access will be an automated process so running a wizard probably won't work. I also would prefer not using an import specification in an existing access database, since new databases may have to be created. The question is: can sql be used to define fields in a flat file, then use those definitions to create a table? Thanks, Dan.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top