Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Sql Related

Sql Related

From: Parvinder Singh <parora_at_questone.com>
Date: Thu, 16 Dec 1999 10:31:08 GMT
Message-ID: <3858BF8D.9227FE17@questone.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US