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.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 how to automate impoting of data from .csv file into sql tab

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-07-13 : 07:45:10
Daisy writes "how to automate impoting of data from .csv file into sql tables. Do i have to convert each csv file into excel then use dts or is there some other way? I have 43 different files whose data is to be put into 15 different sql tables. Plz Help.Thanks"

jimjamjo
Starting Member

10 Posts

Posted - 2005-07-13 : 10:19:35
try using BULK IMPORT t-sql
Go to Top of Page

SreenivasBora
Posting Yak Master

164 Posts

Posted - 2005-07-13 : 15:31:37
Hi Daisy,

The best way to automate this process is DTS. Use the DTS designer, to point all CSV files to database tables. Schedule this package and run in nightly process.

Make sure that every time your csv file names should be same.



With Regards
Sreenivas Reddy B
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-07-13 : 15:35:06
Actually, the best way is to use BULK INSERT as it is the fastest for importing data from files.

Daisy,
You can use a CSV file as the source. Check out BULK INSERT in SQL Server Books Online for details.

Tara
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2005-07-14 : 00:41:17
i believe you're looking for this

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=52263

check nr's link


--------------------
keeping it simple...
Go to Top of Page
   

- Advertisement -