ORACLE WITH 语句 好像不能应用到子查询里

[复制链接]
查看11 | 回复6 | 2007-9-26 18:42:10 | 显示全部楼层 |阅读模式
ORACLE WITH 语句 好像不能应用到子查询里
with fuc as (.....)
select a.firstime,b.lasttime
from
(
select f_username, firstime
from
(
selectf_username,f_addtime as firstime,ROW_NUMBER() OVER (PARTITION BY f_username ORDER BY f_addtime asc) rowrid
fromfuc

) where rowrid =1
)
a left join
(
select f_username, lasttime
from
(
selectf_username,f_addtime as lasttime,ROW_NUMBER() OVER (PARTITION BY f_username ORDER BY f_addtime desc) rowrid
fromfuc
) where rowrid =1
)b on a.f_username=b.f_username
回复

使用道具 举报

千问 | 2007-9-26 18:42:10 | 显示全部楼层
你的写法有误
SQL> select * from (with a as(select 1 x from dual)select a.x from a);
X
----------
1
回复

使用道具 举报

千问 | 2007-9-26 18:42:10 | 显示全部楼层
贴贴看报什么错吧
回复

使用道具 举报

千问 | 2007-9-26 18:42:10 | 显示全部楼层
原帖由 CaptainKobe 于 2010-4-6 14:39 发表
贴贴看报什么错吧

表和视图不存在
回复

使用道具 举报

千问 | 2007-9-26 18:42:10 | 显示全部楼层
我明白了 系统设置
undo_retention integer 21600 约 6个小时
当UNDO空间扩展到32G 最大后,它回过头来看undo_retention保护时间的数据能否释放掉
回复

使用道具 举报

千问 | 2007-9-26 18:42:10 | 显示全部楼层
在WITH里面用了FLASHBACK功能?
回复

使用道具 举报

千问 | 2007-9-26 18:42:10 | 显示全部楼层
汗,我的回帖太草率了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行