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 |
QLx
Starting Member
1 Post |
Posted - 2007-06-07 : 13:49:44
|
Fellows,I’ve come across an elusively stubborn problem that I would like some guidance. I am using the MS SQL utility bcp to output a file, then attempting to use this newly created file to BULK INSERT into another database. When I attempt to bulk-insert into the new database, I get the following error message:‘Bulk Insert fails: Column is too long in the data file for row 1, column 3. Make sure the field terminator and row terminator are specified correctly.’The problem is that I’m using ‘native’ output which should automatically generate a field terminator and row terminator, should it not? What exactly does ‘native’ output entail that I am missing? The command I’m using is bcp.exe PDF_Master_Data.dbo.AnalysisTerms_FTS17 out "C:\ Update_FTS17_AnalysisTerms.bcp" -n-S -Usa –P The switches are simply, -n = Native-S = server-U = user ‘sa’-P = passwordBCP.EXE Version: 9.00.1399.06The resulting file is<breakingspace><null><null><null><null><null><null>h@<dc2><null>P and so on…..Or HEX: 08000000000000684012005000 and so on….The file contents in human readable format should be:192.0 PreFlight Key prohibited in documents PDF version ERR_key_prohitibited_in_PDF_version Y Key prohibited in documents PDF version Error 5.0The problem seems to me that the native output is not properly inserting the field terminators. What are the proper terminators and can I use the -t (field terminator) command along side -n?-Leo |
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-06-08 : 01:28:42
|
Tried with character type? By the way, why don't transfer data with dts package? |
|
|
Power856Ranger
Starting Member
1 Post |
Posted - 2007-06-12 : 12:22:18
|
I have the same issue but after I open the same file and just save it (without making any changes), it works.So, what's happening here? What happens when I save the file that it works?Power856Ranger |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-06-12 : 12:29:52
|
Where did the file come from? Resave it may convert the file to windows format. |
|
|
|
|
|