`
mmdev
  • 浏览: 12916893 次
  • 性别: Icon_minigender_1
  • 来自: 大连
文章分类
社区版块
存档分类
最新评论

SQL Collation issue in temp table.

 
阅读更多

When you create a new temp table and join it with existing tables. you may got this error "Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AI" in the equal to operation.",

This because the default collation in Server defferent from the collation in the tables.

To avoid this error, you can simply change the definition for the temp table as follows,

CREATE TABLE #tmp(NcesSchoolId NVARCHAR(50) COLLATE SQL_Latin1_General_CP1_CI_AS
				, MSRRank INT
				, SchoolNum INT)


分享到:
评论

相关推荐

    Inside Microsoft SQL Server 2000

    Changes in Log Size . Using Database Filegroups . Altering a Database . Databases Under the Hood . Setting Database Options . Other Database Considerations . Backing Up and Restoring a Database...

    自动清理 MSSQL Server Table Collation问题的解决方法

    在一个团队项目中,没有约定好Collation, 在 MS SQL Server中编程就会遇到这样的问题:Cannot resolve the collation conflict between “Latin1_General_CI_AS” and “SQL_Latin1_General_CP1_CI_AS” in the ...

    NTFS Documentation

    Table of Contents 1. Prologue ................................................................................................................ 1 1. NTFS Documentation Preface ....................

    C++标准库(第二版)英文版.pdf

    The C++ Standard Library A Tutorial and Reference (2nd Edition)+cppstdlib-code.zip C++标准库(第二版)英文版.pdf 非扫描版+源代码 Prefaceto the SecondEdition xxiii Acknowledgments for the Second...

    SQL Server 更改DB的Collation

    经常发现同事爲了更改DB的Collation而删掉DB,重新创建过。其实,只要一条SQL就可以解,唔使哽麻烦!!

    MySQL 5.1参考手册

    13.2.5. LOAD DATA INFILE语法 13.2.6. REPLACE语法 13.2.7. SELECT语法 13.2.8. Subquery语法 13.2.9. TRUNCATE语法 13.2.10. UPDATE语法 13.3. MySQL实用工具语句 13.3.1. DESCRIBE语法(获取有关列的信息) ...

    mysql官方中文参考手册

    13.2.5. LOAD DATA INFILE语法 13.2.6. REPLACE语法 13.2.7. SELECT语法 13.2.8. Subquery语法 13.2.9. TRUNCATE语法 13.2.10. UPDATE语法 13.3. MySQL实用工具语句 13.3.1. DESCRIBE语法(获取有关列的信息) ...

    MYSQL中文手册

    13.2.5. LOAD DATA INFILE语法 13.2.6. REPLACE语法 13.2.7. SELECT语法 13.2.8. Subquery语法 13.2.9. TRUNCATE语法 13.2.10. UPDATE语法 13.3. MySQL实用工具语句 13.3.1. DESCRIBE语法(获取有关列的信息...

    MySQL 5.1参考手册中文版

    13.2.5. LOAD DATA INFILE语法 13.2.6. REPLACE语法 13.2.7. SELECT语法 13.2.8. Subquery语法 13.2.9. TRUNCATE语法 13.2.10. UPDATE语法 13.3. MySQL实用工具语句 13.3.1. DESCRIBE语法(获取有关列的信息)...

    MySQL5.1参考手册官方简体中文版

    GreatLinux Inc. 北京万里开源软件有限公司在全国范围提供MySQL产品相关的商务及 技术方面的咨询与支持服务。垂询请致电:8610-65694500,或发送邮件至:sales@greatlinux.com. 本手册编译于2006-7-29,目录及...

    MySQL 5.1参考手册 (中文版)

    13.2.5. LOAD DATA INFILE语法 13.2.6. REPLACE语法 13.2.7. SELECT语法 13.2.8. Subquery语法 13.2.9. TRUNCATE语法 13.2.10. UPDATE语法 13.3. MySQL实用工具语句 13.3.1. DESCRIBE语法(获取有关列的信息) ...

    MySQL 5.1中文手冊

    13.2.5. LOAD DATA INFILE语法 13.2.6. REPLACE语法 13.2.7. SELECT语法 13.2.8. Subquery语法 13.2.9. TRUNCATE语法 13.2.10. UPDATE语法 13.3. MySQL实用工具语句 13.3.1. DESCRIBE语法(获取有关列的信息) ...

    MySQL 5.1官方简体中文参考手册

    1.8.4. MySQL对标准SQL的扩展 1.8.5. MySQL与标准SQL的差别 1.8.6. MySQL处理约束的方式 2. 安装MySQL 2.1. 一般安装问题 2.1.1. MySQL支持的操作系统 2.1.2. 选择要安装的MySQL分发版 2.1.3. 怎样获得MySQL 2.1.4. ...

    mysql5.1中文手册

    MySQL对标准SQL的扩展 1.8.5. MySQL与标准SQL的差别 1.8.6. MySQL处理约束的方式 2. 安装MySQL 2.1. 一般安装问题 2.1.1. MySQL支持的操作系统 2.1.2. 选择要安装的MySQL分发版 2.1.3. 怎样...

    mysql 查询时没有对字符串区分大小写处理方法

    原因分析: mysql 查询时没有对字符串区分大小写的原因主要在于创建表时没有指定其校对规则,或者校对规则设置成了不区分大小写。 区分大小写的设置通常是: utf8****_bin ,...ALTER TABLE `test`  MODIFY COLUMN `

    LuaUnicode icu-lua

    There's a similar issue with indexing the characters of a string by position. string.sub(s, -3) will return the last 3 bytes of the string which is not necessarily the same as the last three ...

Global site tag (gtag.js) - Google Analytics