select t1.ActivityID,t3.PlanName,t1.PlanID,t3.CourseID from TR_Activity t1 left join TR_Plan t3 on t1.PlanID=t3.PlanID where t1.CreatorCorpID='0' and t1.CreatorDepartID='0' and t1.PlanID COLLATE Chinese_Taiwan_Stroke_CI_AS in ( select t2.PlanID from TR_Plan t2 where t2.PlanName like '%' and t2.CreateCorpID='0' and t2.CreateDepartID='0' and t2.status<>'关闭')
执行的时候提示:
无法解决 equal to 运算中 "Chinese_PRC_CI_AS" 和 "Latin1_General_CI_AI" 之间的排序规则冲突。
SELECT TOP 1 *
FROM dbo.Sales a
INNER JOIN dbo.SalesEx b ON b.BillNO = a.BillNO COLLATE Chinese_PRC_CI_AS
用这种方式 连接的时候使用同种排序方式 哪个表不是Chinese_PRC_CI_AS排序 就加上上面的代码