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 |
thundr51
Starting Member
6 Posts |
Posted - 2004-04-20 : 15:10:53
|
I'm trying to create a package that I can use to import a csv file into a table. I can do this easy enough, but the problems are1. The file name will changing daily2. I need to use vb.net to create an app that will allow a user to select the file(s) to be importedI'm relatively new to DTS and sqldts.com has helped some but most of the info there pertains only to VB6. I've scoured the net but I can't seem to find any help, you guys are my last hope... |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
thundr51
Starting Member
6 Posts |
Posted - 2004-04-21 : 08:07:25
|
I'll give this a shot and let you know how this turns out. But I must ask, what kind of speed does this have when dealing with several files up to 5 mb? I wrote something in vb.net to parse everything I needed and shrunk everything down to an insert/update statement. Inserts where pretty quick, but updates where extremely slow. Oh well, i'll give anything a shot once. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-04-21 : 12:26:27
|
The T-SQL version is going to be faster than DTS. DTS brings in a lot of overhead.Tara |
|
|
thundr51
Starting Member
6 Posts |
Posted - 2004-04-23 : 08:22:49
|
Ok, I finally got to play with this and while I was going through the sql I noticed something. This method is perfect if you have set field counts as per the example given but i'm using a csv which means my data is comma delimited. I'd still have to go through the (tedious) task of parsing every line with to put it in the right fields. If DTS brings in a lot of overhead would it be worth trading for the ease of parsing the lines in my file? |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2004-04-23 : 12:08:44
|
No you don'tjust use -t"," parameter in the bcp commandBrett8-)EDIT: ..and 5mb? That's very small |
|
|
|
|
|