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)
 DTS

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-11-10 : 07:34:16
Ahmed writes "What are format files. how can we build them."

robvolk
Most Valuable Yak

15732 Posts

Posted - 2005-11-10 : 07:36:36
Format files are used by bcp, BULK INSERT, and the Bulk Copy task in DTS. They are used to specify the precise formatting of each column in the data file, and can map it to specific columns in the SQL Server table. Books Online has entries on format files, and you can have bcp generate one for you:

bcp "pubs..authors" out authors.txt -SmyServer -T

You'll be interactively prompted for each column in the authors table, and when you're done you'll be prompted to save the format file. You can examine it using Notepad to see how it is laid out.
Go to Top of Page
   

- Advertisement -