View Full Version : importing text files


slimjen1
02-07-2008, 07:09 AM
All,
I have a database that I import text files to create tables. I ve been doing this awhile but now I have to pass it on to someone else to do and are trying to find a better way. this is what I've been doing: I import the text file into a new table. Then I copy and paste the data to the corresponding table. I know I can do an append query to do this but its about 12 text files I have to import into 12 different tables and I didn't want to take the time. I then run a query to combine and sum data from two different tables. The problem is that I have to copy and paste because if I import the text files directly into the corresponding table, the query don't run. I've tried change the field data type in the import wizard but it still doesn't work. My table datatype fields are: field1-text field2-number and field3-number. There is not field for number in the wizard but I use double as a field size in the design table so I select this in the wizard. I don't know how to resolve this other than spending time to create an append query or cut and paste. Please help
Thanks

ted.martin
02-08-2008, 04:05 AM
All that copying and pasting is not a good way. You have said it could be done using an Append Query so I would suggest you do just that.

Don't forget that you can run the queries from code or even use an series of SQL statements so that for the user, it is a straightforward automatic process.

Without really seeing what the problem is for you, its difficult to comment further but Append would seem to be the way to go as copying and pasting certainly isn't.