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
 General SQL Server Forums
 New to SQL Server Programming
 Creating a BCO format file

Author  Topic 

kirknew2SQL
Posting Yak Master

194 Posts

Posted - 2007-10-03 : 15:11:39


I have AdventureWorks installed. I am using SQL Server 2005.

I need to import some large tab delimited text files into SQL. From the research i did I thought that using BCO would be the best solution becausr I will have to import these files and export in the same format.

I am attempting to follow the example at:
Creating a Format File

http://msdn2.microsoft.com/en-us/library/ms191516.aspx
B. Creating a non-XML format file for character data

In my command window at C:\ I enter:
bcp AdventureWorks.HumanResources.Department format nul -c -f Department-c.fmt -T
I was expecting to be prompted with questions about the source file and have a format file created. When i press enter nothing hallende. No errors. Nothing.

Can come one give a beginner the step by step on how to creat the format file and use it to import (and export would be nice too).

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2007-10-03 : 15:24:32
nigel rivett has an article here on using bcp. http://www.sqlteam.com/article/creating-csv-files-using-bcp-and-stored-procedures that link doesn't seem to work anymore.

Here is a direct link to his article: http://www.simple-talk.com/sql/database-administration/creating-csv-files-using-bcp-and-stored-procedures/


EDIT:
fixed article link




-ec
Go to Top of Page

kirknew2SQL
Posting Yak Master

194 Posts

Posted - 2007-10-03 : 16:34:16
The Nigel Rivett has an article is good. But it talks about moving data from a SQL table to a file. I need to first get the data out of my tab delimited file and into a SQL table. Do u know of a good artical that goes through that process? :)
Go to Top of Page
   

- Advertisement -