首页
技术基础
备份恢复
SQL优化
诊断案例
BLOG
留言板
服务
生活
网摘
阅读
下载
墨天轮
English
eygle.com - 留言簿 - 回复留言 - Powered by eYgLe.Com
返回留言簿
回 复 留 言
留言ID:
留言原文:
To
:
eygle
老师,你好,近期在开发中遇到一个自己无法分析的问题,希望老师能给解答一下:
通过以下语句,在pl/sql中我看到了有logdate3等于30的数据
select (t.responsedt - tt.acceptbegintime) * 86400 logdate3--t.responsedt日期类型
from t_sale_campresultinfo t, t_pub_commoninfo_2 tt
where t.keepcol5 = tt.serialno
and tt.acceptbegintime >= to_date('2009-04-30', 'yyyy-mm-dd')
and tt.partid = '0430'
可当我想过滤掉logdate3为大于等于30的数据时,执行以下语句却达不到效果
select *
from (select (t.responsedt - tt.acceptbegintime) * 86400 logdate3--t.responsedt日期类型
from t_sale_campresultinfo t, t_pub_commoninfo_2 tt
where t.keepcol5 = tt.serialno
and tt.acceptbegintime >= to_date('2009-04-30', 'yyyy-mm-dd')
and tt.partid = '0430'
)
where to_number(logdate3) = 30
执行以上语句的时候,依然会存在logdate3为30的数据,为什么会这样,难到说时间类型乘以86400后,不是自动转换为number类型,而是float类型吗?可为什么在pl/sql中看到的结果集就是number类型的,看上去它就是一个整数?
我接触oracle也有两年多了,可还是第一次遇上该问题,实在不知道如何去分析!
From
:
minxin
2009.05.06 17:35
管理密码:
请输入管理密码, 否则无法回复.
斑竹昵称:
信息图标: ( 随机 )
BB 代码:
字体
宋体
黑体
隶书
楷体
幼圆
Arial
颜色
天蓝
品蓝
蓝色
深蓝
橙色
橙红
深红
红色
砖红
暗红
绿色
灰绿
海绿
粉红
果红
桃红
紫色
紫蓝
棕木
沙褐
土黄
深褐
土绿
灰色
大小
1号
2号
3号
4号
5号
内容:
如果想删除回复, 请点击最下面的删除回复按钮.
删 除 回 复
管理密码:
请输入管理员密码, 只有版主才能删除回复.
Copyright © 2003~2012
eygle.com
All Rights Reserved.
Powered by:
www.eygle.com