By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,419 Members | 1,609 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,419 IT Pros & Developers. It's quick & easy.

BCP .fmt for Fixed Length

benchpolo
100+
P: 142
/*START: Bulk insert data into Tables: EZCAP1.1400_byte_layout.dbo.BOW_Received*/
--create format file for bulk insert
set @sCmd='bcp [1400_byte_layout].dbo.BOW_Received format nul -f \\arcsan\vol2\SHARE\EDI\Randy\BOW_Received.FMT -SEZCAP1 -T -c -t";"'
exec master..xp_cmdshell @sCmd


8.0
10
1 SQLCHAR 0 1 ";" 1 FILLER SQL_Latin1_General_CP1_CI_AS
2 SQLCHAR 0 9 ";" 2 ACCTNO SQL_Latin1_General_CP1_CI_AS
3 SQLCHAR 0 10 ";" 3 SERIALNO SQL_Latin1_General_CP1_CI_AS
4 SQLCHAR 0 41 ";" 4 AMOUNT ""
5 SQLCHAR 0 6 ";" 5 ISSUEDATE SQL_Latin1_General_CP1_CI_AS
6 SQLCHAR 0 6 ";" 6 PAIDDATE SQL_Latin1_General_CP1_CI_AS
7 SQLCHAR 0 8 ";" 7 SEQNO SQL_Latin1_General_CP1_CI_AS
8 SQLCHAR 0 50 ";" 8 LOCATION SQL_Latin1_General_CP1_CI_AS
9 SQLCHAR 0 1 ";" 9 RECTYPED SQL_Latin1_General_CP1_CI_AS
10 SQLCHAR 0 24 "\r\n" 10 UPDATEDON ""


Does the above .fmt works for Fixed length format? Thanks.
Oct 20 '08 #1
Share this Question
Share on Google+
1 Reply


ck9663
Expert 2.5K+
P: 2,878
Here's the explanation of how format files work.

-- CK
Oct 21 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.