Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
sp_wiz
Yak Posting Veteran
55 Posts |
Posted - 2001-12-12 : 07:58:55
|
| I have a project that requires me to read 4000 text files into a sql table..The tables schema is ProductID intProductFileName varchar(200)ProductDescription varchar(4000)The product description is what is in all the text files. The ProductFilename contains the name of the file.This seems to work for a single file, but i really need each description on its own row with a product idDeclare @filename sysnameset @filename = 'C:\Inetpub\wwwroot\diy\text Descriptions\0001.txt' CREATE TABLE #tempfile (line varchar(8000)) EXEC ('bulk INSERT #tempfile FROM "' + @filename + '"') SELECT * FROM #tempfileCan anyone help or had experience with such a problemrobp |
|
|
sica
Posting Yak Master
143 Posts |
Posted - 2001-12-12 : 10:01:05
|
| What is the problem ?Can't you save the file name as well in the table?Sica |
 |
|
|
sp_wiz
Yak Posting Veteran
55 Posts |
Posted - 2001-12-13 : 08:34:34
|
| Yeah I can't seem to get the syntax rightCheersRobp |
 |
|
|
|
|
|