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

时间:2014-05-06 09:03:19

标签: sql oracle

我使用以下查询获取错误代码ORA-12704

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

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

3 个答案:

答案 0 :(得分:3)

试试这个

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

参考

ORA-12704: character set mismatch

答案 1 :(得分:1)

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

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

答案 2 :(得分:1)

或者你可以使用这个:

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