Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Sql Related
Hi all
I have to do the following
the table schema is
pg_id pg_parentval pg_hierarchy pg_orgindex
The orgindex field has to be updated with the following query
(select rownum
from program
where limit_status = 'Y'
start with pg_val in
(select pg_val
from program
where pg_parent = ' ')
connect by pg_parent = prior pg_val)
what i am trying to do is something like this
update program a
set limit_status = 'Y', orgindex = rownum,
(select rownum
from program
where limit_status = 'Y'
and a.pg_val = program.pg_val
start with pg_val in
(select pg_val
from program
where pg_parent = ' ')
connect by pg_parent = prior pg_val);
but it doesn't work ...Any idea what kind of query would it be
I hope i am clear with the problem
Thanks in Advance
Regards
~Parvinder
Received on Thu Dec 16 1999 - 04:31:08 CST
![]() |
![]() |