Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BCP: Unable to resolve column level collations

Tags:

sql-server

bcp

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.

like image 586
user12861 Avatar asked Nov 14 '22 14:11

user12861


1 Answers

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.

like image 189
user12861 Avatar answered Dec 22 '22 13:12

user12861