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.
Author |
Topic |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-07-10 : 09:12:25
|
RAMESH K writes "Hi,Hi have a foxpro table called "TTT.DBF" which contains more than 40,00,000 records.In Sql Server, i had database called "Para" and table called "PST".Using Bulk Insert command i want to copy records from Foxpro to Sql Server.The following steps i followed for Bulk Insert command. 1. I created a text file called "TTT.Txt" with delimiated (,). 2. In query analyzer, i used the following command. Bulk Insert para.PSt from 'c:\ttt.txt'{ FIELDTERMINATOR ',' } 3. while running this command, i am getting the following errors Bulk Insert fails. Column is too long in the data file for row 1, column 1. Make sure the field terminator and row terminator are specified correctly. OLE DB provider 'STREAM' reported an error. The provider did not give any information about the error. The statement has been terminated.I want to know how to use bulk insert command..ThnkRki" |
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-07-10 : 09:26:49
|
Bulk Insert para.PSt from 'c:\ttt.txt' with (FIELDTERMINATOR = ',')But sounds like your syntax has worked.Check that the row terminator is crlfTry it with a single line then single column.It sounds like it hasn't recognised the terminator for the first column so maybe it is your syntax.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-07-10 : 09:34:13
|
What is a row separator for your text file?First of all, your syntax of Bulk Insert command is wrong. It's as below:Bulk Insert para.PSt from 'c:\ttt.txt'with ( FIELDTERMINATOR = ',' )Harsh AthalyeIndia."Nothing is Impossible" |
|
|
|
|
|
|
|