ORA-12704: 字符集与 Oracle 中的 nvarchar2 数据类型不匹配

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23490330/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 02:21:11  来源:igfitidea点击:

ORA-12704: character set mismatch with nvarchar2 datatype in Oracle

sqloracle

提问by Sajeev

I get the error code ORA-12704with the following query:

我通过ORA-12704以下查询得到错误代码:

SELECT COALESCE(BankDetails.description,'') as description FROM BankDetails

The datatype of description column nvarchar2. I'm assuming the ''is the cause of the issue as this is not matching with the datatype.

描述列 nvarchar2 的数据类型。我假设 ''是问题的原因,因为这与数据类型不匹配。

回答by Jaime García Pérez

Try this

尝试这个

SELECT COALESCE(BankDetails.description,n'') as description FROM BankDetails

Reference

参考

ORA-12704: character set mismatch

ORA-12704: 字符集不匹配

回答by Patrick Hofman

You should use the nvariant, to cast the ''to a nvarchar:

您应该使用n变体,将 the 转换''为 a nvarchar

SELECT COALESCE(BankDetails.description,n'') as description FROM BankDetails

回答by Wernfried Domscheit

Or you could use this one:

或者你可以使用这个:

SELECT COALESCE(BankDetails.description, NULL) as description FROM BankDetails