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 2005 Forums
 Transact-SQL (2005)
 Import CSV File Data

Author  Topic 

DesiGuju
Starting Member

12 Posts

Posted - 2007-06-05 : 21:04:57
How can I import CSV file data into SQL Server table? I need to insert data from CSV file to table twice a day. Table has more then 10 fields but I only need to insert value into two fields.

Any suggestion?

Thanks In Advance

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-06-05 : 22:47:09
Use import data wizard or ssis package, you can set schedule to execute the package.
Go to Top of Page

DesiGuju
Starting Member

12 Posts

Posted - 2007-06-06 : 09:50:30
Thanks for the response.

Actully, i would like to import a csv file into a table with a stored procedure. Lets say the file is located at C:\foldername\test.csv.

Once the stored procedure is crated i would like to schedule it to run twice a day. Is it possible with SQL 2005 ?

Thanks
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-06-06 : 10:07:18
Make use of Job. Read about it in sql server help file

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-06-06 : 10:27:17
Yes, you can create sql job for that under sql agent.
Go to Top of Page

DesiGuju
Starting Member

12 Posts

Posted - 2007-06-07 : 09:33:16
Thanks for the response.

I actully need to update my table with CSV data...twice a day.

I don't think there is a Bulk Update....any other way to work around this ?
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-06-07 : 09:35:11
here you go:
http://weblogs.sqlteam.com/mladenp/archive/2006/07/22/10742.aspx

there's no way to update it. only insert it.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page
   

- Advertisement -