Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help with update query
Hi,
Don't know what version you are using, but there is a way in Oracle 9i -
merge into calendar c
using
(
select rowid rid, rank() over (order by calendar_date) seq from calendar where business_day = 'Y'
c.rowid = c1.rid
)
when matched then update
set c.business_day_sequence = c1.seq
when not matched then -- THIS IS JUST DUMMY, THIS WILL NEVER HAPPEN
insert ( calendar_date )
values ( null );
I tried creating a view and then updating a view, but it does not allow view update because of the rank function.
Regards,
Pratap Received on Thu Sep 23 2004 - 07:00:07 CDT