BCP: Unable to resolve column level collations

user12861 picture user12861 · Nov 9, 2009 · Viewed 21.8k times · Source

Running this:

bcp MyDb.dbo.uvwMyView out "c:\Test.txt" -SMyServer -T -c

I get this error:

SQLState = S1000, NativeError = 0
Error = [Microsoft][SQL Native Client]Unable to resolve column level collations 

Searching google finds many possible solutions, none of which work for me or have worked for any of the people they were proposed for. As with other cases posted online, the view causes no problems when I select from it in Management Studio and the results look normal (and have no special characters, I checked). The one text column in the results has collation SQL_Latin1_General_CP1_CS_AS. I have tried several options to bcp with no effect: -w, -CRAW, -COEM, -C850, -C437.

I'm using SQL Server 2005.

Answer

user12861 picture user12861 · Nov 11, 2009

Dropping the view and recreating it fixed the problem. Unfortunately this doesn't explain how the problem happened in the first place, or how to prevent it in the future. This isn't a satisfying solution, so if anyone knows a better answer, I'm still very interested in hearing it.