Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 bulk insert problem
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Posting Yak Master

167 Posts

Posted - 12/30/2013 :  02:21:20  Show Profile  Visit pascal_jimi's Homepage  Reply with Quote
text file so

005283 BAK? BA? S?HIYY? IDAR?SI 2 100 00010130606 1000 000 000 000 000 1000 1
020200*AVIRTEL MMC 2 000 3803710 -200 000 000 000 000 -200 0

1--- I created a table

CREATE TABLE idare_abune
(Test char(6), Test1 char(60), Test2 char(2), Test3 char(4),
Test4 char(26), Test5 char(11), Test6 char(12),
Test7 char(8), Test8 char(7), Test9 char(7),
Test10 char(11), Test11 char(5), Test12 char(7),Test13 char(3))

2--------- I created a fmt file

exec xp_cmdshell
'bcp ats342.dbo.idare_abune format nul -S XIRDALAN-SERVER -f "c:\temp\idare_abun.fmt" -c -T'

3----------I changed fmt file

'\t' to ''


BULK INSERT idare_abune
FROM 'C:\Documents and Settings\?????????????\??????? ????\obrabotka\OBOROTKA-092.list.txt'
FORMATFILE = 'c:\temp\idare_abun.fmt'


i get error

The statement has been terminated.

Aged Yak Warrior

982 Posts

Posted - 12/30/2013 :  03:24:43  Show Profile  Reply with Quote
the number of column from the text file and table seem different
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000