Conflict conflict

I use linq for SQL and when I run this query

        var lstData = from s in dataTrackDB.datas
                      join m in dataTrackDB.mkts on s.mktcode equals m.mktcode
                      join n in dataTrackDB.mktnews on m.mktcode equals n.oldmktcode
                      select new data
                      {
                          AccountDes = m.account,
                          commodity = s.commodity,
                          date = s.date,
                          daysvalid = s.daysvalid,
                          mktcode = s.mktcode,
                          mktDes = n.mktdesc,
                          price = s.price,
                          prodid = s.prodid,
                          statecode = s.statecode,
                          subcommodity = s.subcommodity,
                          supprecode = s.supprecode,
                          units = s.units
                      };

I will get "Cannot resolve collision conflict between" SQL_Latin1_General_CP1_CI_AS "and" Latin1_General_CI_AS "in equal action". I would be grateful if someone would tell me how to write a linq query?

thank

+3
source share
1 answer

The problem is collationyour columns in the database, change them to the same sort.

setting column matching can affect comparison operators in sql.

http://www.sqldbadiaries.com/2010/10/31/changing-sql-server-collation/

http://blog.sqlauthority.com/2008/12/20/sql-server-change-collation-of-database-column-t-sql-script/

+1
source

Source: https://habr.com/ru/post/1728533/


All Articles