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 Data from Comma Seperated File

Author  Topic 

Edski
Starting Member

3 Posts

Posted - 2009-05-12 : 12:50:03
I have a UNIX box that creates a comma separated file daily and places it on a server, is there a way to get the data from this file and append it to a sql 2005 table automatically? I am currently doing it manually using "SQL Server Import and Export Wizard".

Thank You
Edski

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2009-05-12 : 13:40:15
You could create an SSIS package that looks for files and loads them. Then schedule a job that executes that package on a scheudle that makes sense.
Go to Top of Page

Edski
Starting Member

3 Posts

Posted - 2009-05-12 : 14:38:41
Any link to some kind tutorial on how to create a SSIS package, I am not very advanced to SQL just simple queries and functions.
Go to Top of Page

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2009-05-12 : 15:15:53
If it's just a simple data load, have a look at the bcp utility:
bcp MyDatabase.dbo.MyTable in Y:\File.dat -T -c -t","

Go to Top of Page

Edski
Starting Member

3 Posts

Posted - 2009-05-12 : 15:34:51
Yes it is a simple data load, I will look at the bcp utility, do you happen to know if SQL Express 2005 has this utility?

Thank you...
Go to Top of Page

Biscuithead
Starting Member

30 Posts

Posted - 2009-05-12 : 15:48:48
Yes http://books.google.com/books?id=TiBD7r1baDYC&pg=PA135&lpg=PA135&dq=bcp+utility+express&source=bl&ots=xORo8JFrnR&sig=WHc5Q8SXjlZ9LKA6FPnDLqXJd9s&hl=en
Go to Top of Page

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2009-05-12 : 15:53:41
Yes, you need SQLServer Management Studio Express / SQL Express Toolkit to get bcp.exe

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

Go to Top of Page
   

- Advertisement -