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 querry

SQL querry

From: <minkuarora_at_my-deja.com>
Date: Thu, 25 Nov 1999 06:34:17 GMT
Message-ID: <81il99$372$1@nnrp1.deja.com>


Hi all

I have got a table something like this

Dim-Id Dim Value Limit Status

Product   	p1 		Y
Product   	p2		Y
Product   	p3              N
Market     	M1		N
Market 	   	M2		Y

Now i want records from the table which shoud be something like this

Product   	p1 		Y   1
Product   	p2		Y   2
Market 	   	M2		Y   1

In othere words wherever the limit Status flag is set to Y the count should start increasing and whenever the Dim-Id changes the count should again start from 1
rownum would not help me in having this kind of numbering since it will give me a incremental numbering .....can u give me some idea how should i do ?

I hope i am clear with the problem

Thanks and Regards

Parvinder

P.S : I can keep a field for the number but the whole point is i have to how will i update that field ...since they have to be updated as per Limit Status Flag and everytime the flag value changes i hve to fire a process which will do the renumbering but how will i do the updation of the numbering in other words what kind of SQL querry would it be to do the renumbering ???

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Nov 25 1999 - 00:34:17 CST

Original text of this message

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