免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1663 | 回复: 5
打印 上一主题 下一主题

同样条件查询可以,但是删除不行?古怪,而且是部分的删除不行!数据行并无特别之处。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-07-12 09:15 |只看该作者 |倒序浏览
可以用下面的语句获取数据,
select *
    from f_daily_purchase_order a
                   where exists(select 1
                                  from t_f_daily_purchase_order
                                       where po_no = a.po_no
                          and sid_str = a.sid_str
                               and sid_item_c = a.sid_item_c)
但是却不能用
delete   from f_daily_purchase_order a
                   where exists(select 1
                                  from t_f_daily_purchase_order
                                       where po_no = a.po_no
                          and sid_str = a.sid_str
                               and sid_item_c = a.sid_item_c)
我的oracle版本是
Oracle Database 10g Enterprise Edition Release 10.1.0.5.0 - Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options

不知哪位高人曾经碰到过相同的情况,并求解决之道!
在此谢过了!

[ 本帖最后由 suomaliren 于 2006-7-12 09:19 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2006-07-12 09:53 |只看该作者
create table temprowid as
select rowid
    from f_daily_purchase_order a
                   where exists(select 1
                                  from t_f_daily_purchase_order
                                       where po_no = a.po_no
                          and sid_str = a.sid_str
                               and sid_item_c = a.sid_item_c);

delte from f_daily_purchase_order a
     where exist (select 1 from temprowid where rowid = a.rowid);

dorp table temprowid

论坛徽章:
0
3 [报告]
发表于 2006-07-12 10:00 |只看该作者
什么错误提示?说清楚点。

论坛徽章:
0
4 [报告]
发表于 2006-07-12 11:05 |只看该作者
楼上的,删除过程中没有任何的错误提示!

论坛徽章:
0
5 [报告]
发表于 2006-07-12 16:22 |只看该作者
請將下面几步的執行過程與結果顯示出來﹕

select count(*) from f_daily_purchase_order


select count(*)
    from f_daily_purchase_order a
                   where exists(select 1
                                  from t_f_daily_purchase_order
                                       where po_no = a.po_no
                          and sid_str = a.sid_str
                               and sid_item_c = a.sid_item_c)



delete   from f_daily_purchase_order a
                   where exists(select 1
                                  from t_f_daily_purchase_order
                                       where po_no = a.po_no
                          and sid_str = a.sid_str
                               and sid_item_c = a.sid_item_c)


我們要看的是過程﹐﹐﹐。。。。一切相關的信息...

论坛徽章:
0
6 [报告]
发表于 2006-08-31 19:31 |只看该作者
似乎是别的用户已经锁定该数据。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP