使用重复行中的rowid更新记录。 [英] To update a record using rowid in duplicate row.

查看:75
本文介绍了使用重复行中的rowid更新记录。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




想要编写一个plsql代码来使用rowid更新单个记录,其中所有行都是重复的,在这种情况下有人可以帮助我。


Prod_service_id位置功能ord

----------------------- --------- --- ---------- ----

PP23456 Chennai Fast2 B77

PP23456 Chennai Fast2 B77


现在我需要将其中一条记录更新为madurai。



谢谢,

Ganesh

Hi,

want to write an plsql code to update a single record using rowid where all the rows are duplicated could someone help me in this case.

Prod_service_id Location feature ord
----------------------- ------------ ---------- ----
PP23456 Chennai Fast2 B77
PP23456 Chennai Fast2 B77

Now I need to update one of the record to madurai.


Thanks,
Ganesh

推荐答案

update our_table

set Location =''madurai''

WHERE rowid in

(SELECT MIN( rowid)

FROM our_table

GROUP BY Prod_service_id,位置,功能,ord);

update our_table
set Location = ''madurai''
WHERE rowid in
(SELECT MIN(rowid)
FROM our_table
GROUP BY Prod_service_id, Location, feature, ord);





想要编写一个plsql代码来使用rowid更新单个记录,其中所有行都是重复的,在这种情况下有人可以帮助我。


Prod_service_id位置功能ord

----------------------- --------- --- ---------- ----

PP23456 Chennai Fast2 B77

PP23456 Chennai Fast2 B77


现在我需要将其中一条记录更新为madurai。



谢谢,

Ganesh
Hi,

want to write an plsql code to update a single record using rowid where all the rows are duplicated could someone help me in this case.

Prod_service_id Location feature ord
----------------------- ------------ ---------- ----
PP23456 Chennai Fast2 B77
PP23456 Chennai Fast2 B77

Now I need to update one of the record to madurai.


Thanks,
Ganesh


谢谢你的完美.....

有没有办法在更新前存储rowid。

请指导我解决问题。
Thanks thats Perfect.....
Is there any way to store the rowid before updating.
Please guide me to get through the issue.



谢谢那就完美.....

有没有办法存储更新前的rowid。

请指导我解决问题。
Thanks thats Perfect.....
Is there any way to store the rowid before updating.
Please guide me to get through the issue.



如果您想将更新的记录存储到某些日志表中,可以告诉我们吗?

Could you please let us know if you would like to store the record that is getting updated in to some log table or something?


这篇关于使用重复行中的rowid更新记录。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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