选择查询结果中显示的符号无效 [英] Invalid symbol displayed in my select query result

查看:104
本文介绍了选择查询结果中显示的符号无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

以下是我的选择查询,

hi all,
The following is my select query,

select substr(trim(to_char(AMOUNT, '00000000000.00')),1,11) from mytable where status_code='V';



我在Oracle 10g(Windows Server)中运行此查询时获得了正确的结果,但是当我在Oracle 11g(Linux服务器)中运行相同的查询时,我得到的结果如下所示


I got the right result while I run this query in Oracle 10g (windows Server), but while i run this same query in Oracle 11g (Linux Server) i got the result as like this below

###########
###########
###########



我不知道为什么会出现'#''符号而不是值。请提出你的建议。



问候,

Bluesathish。


I don''t know why this ''#'' symbol occurs instead of the values. Kindly give your suggestion.

Regards,
Bluesathish.

推荐答案





您的格式掩码格式&长度应该与你检索的值相匹配,否则你会得到这个。



在你的查询执行顺序如下,



1. to_char

2.修剪

3. substr



试试以下查询,你得到了问题,



Hi,

Your format mask format & length should be match with the value you retrieved otherwise you will get this.

In your query execution order will be like below,

1. to_char
2. trim
3. substr

Try the following query, you get the problem,

<pre>

select to_char(trim(substr(&)来自mytable的AMOUNT,1,11)),'00000000000.00'')status_code =''V'';

select to_char(trim(substr(&AMOUNT,1,11)),''00000000000.00'') from mytable where status_code=''V'';






您的格式掩码格式&长度应该与你检索的值相匹配,否则你会得到这个。



在你的查询执行顺序如下,



1. to_char

2.修剪

3. substr



试试以下查询,你得到了问题,



Hi,

Your format mask format & length should be match with the value you retrieved otherwise you will get this.

In your query execution order will be like below,

1. to_char
2. trim
3. substr

Try the following query, you get the problem,

select to_char(trim(substr(&AMOUNT,1,11)),''00000000000.00'') from mytable where status_code=''V'';


我的Oracle数据提供程序是问题,以前我使用的是devart dotConnect v5。 0,当我升级到v7.5它的工作正常。即,数据插入时我必须这样做。我发布的查询没问题。



注意:此升级是由于oracle 10g迁移到11g。通过devart dotConnect v5.0连接的Oracle 11g服务器出现问题。因此我们必须升级devart dotConnect版本7.5才能连接Oracle 11g。



感谢所有回答我问题的人。



问候,

Bluesathish
My Oracle data Provider was the problem, previously i''ve using devart dotConnect v5.0, when i upgrade this to v7.5 its working fine. ie., while the time of data insertion i''ve to do this. No problem with the query which i posted.

Note: This upgradation is due to the migration of oracle 10g to 11g. The problem occurs for the Oracle 11g server connected via devart dotConnect v5.0. So we''ve to upgrade devart dotConnect version 7.5 inorder to connect Oracle 11g.

Thanks for all who replied my question.

Regards,
Bluesathish


这篇关于选择查询结果中显示的符号无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆