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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-01-25 : 09:14:04
|
| Forrest writes "I am trying to import from a text file into a sql table based on the first field in the the delimitted file. The file would look like:tableName,field1,field2tableName,field1,field2,field3where each tableName is diferent. I have tried using the BULK INSERT function, and cannot see how to switch the tables dynamically. I am running Windows 2000 Server running SQL 7.0 and 2000. Any help here would be greatly appreciated. Thanks so much." |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-01-25 : 12:18:42
|
| To be honest, keeping data meant for multiple tables in one text file is not a good idea...it cause problems like the one you're experiencing, among others, and there's no benefit at all. If you can split each table's data into separate files then you can BULK INSERT no problem.DTS is highly programmable, you could write some code to parse out the table name and change the transformation accordingly. If you don't like that idea, I'm afraid I can't think of another one, that's the nature of the problem you have. Again, try creating separate text files for each table and load them individually. |
 |
|
|
|
|
|
|
|