Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-sqlserver > #1752
| From | Erland Sommarskog <esquel@sommarskog.se> |
|---|---|
| Newsgroups | comp.databases.ms-sqlserver |
| Subject | Re: load multiple txt files to sql server |
| Date | 2014-05-24 09:45 +0200 |
| Organization | Erland Sommarskog |
| Message-ID | <XnsA3376359BB035Yazorman@127.0.0.1> (permalink) |
| References | <a76c710f-76e8-4cfd-b098-9f0d3a2e5897@googlegroups.com> |
tad na (teddybubu@gmail.com) writes: > I need to import hundreds of data txt files to sql server 2008. > All the txt files are in folders. The folders names are country names. > Obviously, I don't want to do this manually. > This is what I want: > > 1. import all country/folder names into sql server and create a table > example: dbo.China > 2. import all txt files in country/folder to specific dbo in sql server > > Is this possible to do and is it done with stored procedures?? > How do I do this? I am a beginner so any help is appreciated. Is the structure of the text files the one and the same? In such case you should not create a table per file or folder, but a single table. The folder/country name should probably be a column in that table. As for organising the import, you would have to write a program or use SQL Server Integration Services (which I am not familiar with myself). -- Erland Sommarskog, Stockholm, esquel@sommarskog.se
Back to comp.databases.ms-sqlserver | Previous | Next — Previous in thread | Next in thread | Find similar
load multiple txt files to sql server tad na <teddybubu@gmail.com> - 2014-05-23 19:42 -0700
Re: load multiple txt files to sql server Erland Sommarskog <esquel@sommarskog.se> - 2014-05-24 09:45 +0200
Re: load multiple txt files to sql server bradbury9 <ray.bradbury9@gmail.com> - 2014-05-24 04:20 -0700
Re: load multiple txt files to sql server tad na <teddybubu@gmail.com> - 2014-05-24 09:32 -0700
Re: load multiple txt files to sql server Erland Sommarskog <esquel@sommarskog.se> - 2014-05-24 21:57 +0200
Re: load multiple txt files to sql server bradbury9 <ray.bradbury9@gmail.com> - 2014-05-25 03:21 -0700
Re: load multiple txt files to sql server rja.carnegie@gmail.com - 2014-05-24 15:30 -0700
Re: load multiple txt files to sql server tad na <teddybubu@gmail.com> - 2014-05-24 20:50 -0700
Re: load multiple txt files to sql server Erland Sommarskog <esquel@sommarskog.se> - 2014-05-25 11:16 +0200
csiph-web