Caused exception message is: ORA-12704: 字符集不匹配
来源:互联网 发布:淘宝网系统正在繁忙 编辑:程序博客网 时间:2024/05/16 14:51
该问题是在使用union all 合并select查询的两个结果集时,出现某个字段的类型
与对应字段的类型不一致导致的.
因为sql比较长,一个一个字段在排除。终于发现
字段bizDate: select to_char(FBizDate,'yyyy-mm-dd hh24:mi:ss') as bizDate ---本身FbizDate是datetime类型转字符类型
字段*** : select sNumber ----sNumber 不知道它的数据类型 可以肯定是字符 但不知道是char还是varchar
问题出现了:
e.g:
select to_char(FBizDate,'yyyy-mm-dd hh24:mi:ss')
union all
select sNumber
一直以为 sNumber是字符类型,确实它是字符类型,但字符也有char,varchar
所以犯错了。既然上面转换成char 那么下面字段也得转换成char 即 to_char(sNumber)
突然间发现 数据库真的烦人..
- Caused exception message is: ORA-12704: 字符集不匹配
- ORA-12704: 字符集不匹配
- ORA-12704: 字符集不匹配
- ORA-12704:字符集不匹配
- ORA-12704:字符集不匹配
- Caused exception message is: ORA-01789: query block has incorrect number of result columns
- Caused exception message is: ORA-01789: query block has incorrect number of result columns
- Caused exception message is: ORA-01789: query block has incorrect number of result columns
- ORA-12704:字符集不匹配错误
- sql ... Caused exception message is: index: 1, size: 0
- sql ... Caused exception message is: index: 1, size: 0
- 关于Union 中 ORA-12704:字符集不匹配问题的解决
- 关于Union 中 ORA-12704:字符集不匹配问题的解决
- 关于union 中 ORA-12704:字符集不匹配问题的解决
- Oracle中由 case when 报错 ORA-12704:字符集不匹配的简易解决
- Oracle中 Union 中 ORA-12704:字符集不匹配问题的解决
- Caused by: java.sql.SQLException: ORA-01861: 文字与格式字符串不匹配
- oracle:字符集不匹配
- ICELAND:Dancing on the brink of Bankruptcy(1)
- jsp文件上传浏览,支持ie 6,7,8 -----------亲自验证了的
- VB备份ACCESS数据库的方法,代码
- 哈工大对抗甲流-1
- 一穷二白
- Caused exception message is: ORA-12704: 字符集不匹配
- 我的百度空间:
- getsockopt()与setsockopt()函数介绍
- NS2学习(3)——mac定时器
- Qt Designer的使用(1)
- 解决linux下flash中文乱码,方块字的方法!
- 软件
- 开机自动挂载分区!
- Orecle 10g 数据库角色登陆