Timeline for SELECT Data Set Using Stored Procedure with BCP Error
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 20, 2012 at 14:51 | comment | added | MoonKnight |
Why? Basically, the SP is casting Empty.Strings to nulls to get around BCP putting the ASCII CHAR(0)/Nul character in the output file. Running SELECT * FROM [2BSHAEOS]..[B1A]; as the query works. I think you are right and this is occuring due to the fields specified in the format file being of an incorrect order as the fields output by my SP - this goes from bad to worse! You should see the SP that creates the .fmt file!!
|
|
Nov 20, 2012 at 14:33 | comment | added | John K. N. | True. How did I miss that one. | |
Nov 20, 2012 at 14:33 | comment | added | Remus Rusanu | A bcp out format file specified that a column should be skipped. This is not allowed. Either create a view containing only the desired columns and bcp out from that view, or use the -Q flag to provide a SELECT statement selecting only the desired columns.. The problem is your format file. | |
Nov 20, 2012 at 14:30 | vote | accept | MoonKnight | ||
Nov 20, 2012 at 14:18 | history | answered | Remus Rusanu | CC BY-SA 3.0 |