Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.ms-sqlserver    |    Notorious Rube Goldberg contraption    |    19,505 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 19,064 of 19,505    |
|    Erland Sommarskog to tad na    |
|    Re: load multiple txt files to sql serve    |
|    24 May 14 09:45:59    |
      From: esquel@sommarskog.se              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              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca