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 |
Steve@CSC
Starting Member
6 Posts |
Posted - 2002-07-31 : 16:08:45
|
OK guys, here's what I'm trying to accomplish for starters:1) Create a DTS package to import 66 CSV files to a SQL 2000 database. Tedious, but not a problem.2) Now, make that DTS package work for 20-odd clients, all of whom have different source file locations & destination database names.3) Perform the above so that the addition of new tables & clients is easily implemented by people with even less SQL experience than I.4) There are a few other gotchas, such as some clients requiring multiple source CSVs for a single table & handling journal updates, but I'm not worrying about that yet.I'd tried to work this out using SQL 7.0, but neither global nor environment variables 'took' as far as the source or destination filenames went. I was told SQL 2000 would handle this, but I'm still coming up short of the goal.Any suggestions for a SQL newbie? |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-07-31 : 16:18:24
|
There's some good info in Books Online on programming DTS, also take a look here:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dtsprog/dtspapps_21rn.aspIt's probably best to put together some VB or C code to construct the entire DTS job from user input (here's the file, here's the table I want to dump it into, or create a new table if it's not already there) You could even do it using ActiveX script code. The data transformation(s) will be the toughest part really, and I think it'll be easier to create them rather than modify existing transforms in a generic package. |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2002-07-31 : 16:19:02
|
I would lean towards building a dynamic 'bcp in' string and a proc that iterates through some table to import all the files. Dynamic DTS is doable...more so in 2k than 7.0...but a PITA...Jay White{0} |
|
|
|
|
|
|
|