467,915 Members | 1,265 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,915 developers. It's quick & easy.

BCP .fmt for Fixed Length

benchpolo
100+
/*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
  • viewed: 6495
Share:
1 Reply
ck9663
Expert 2GB
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.

Similar topics

26 posts views Thread by Adrian Parker | last post: by
2 posts views Thread by coz | last post: by
3 posts views Thread by ecov | last post: by
5 posts views Thread by David Garamond | last post: by
2 posts views Thread by Frank Swarbrick | last post: by
13 posts views Thread by Neil Cerutti | last post: by
2 posts views Thread by Edwin.Madari | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.