Posted: Feb 7, 2013 10:19 PM Edit Reply
hi all... i have a query...
i have the following detail with me....
Numbers Key abc column date
12345 Y JVN 7/30/2010 20:45
12345 N YVM 4/30/2011 1:45
12354 Y JVN 6/18/2007 14:37
12345 N YVM 5/13/2008 16:28
i have N no of records like this. I need to write a query to find when the key underwent any change (from Y to N and from N to Y).
This is for a single Numbers column(eg:12345). I have several numbers like this.
Can someone help me with a querry for this???
Thanks in advance
So the data needs to be ordered by date, and you need to identify when an attribute changed value ?
Personally I would do this using plsql looping through a cursor, checking current value to previous value. Someone else here may be able to suggest how to do it via pure sql.
Please close this thread and open it in [url https://forums.oracle.com/forums/forum.jspa?forumID=75]SQL and PL/SQL forum with, create table, couple of insert statements and more explanation on required ouput. I read the question, but I failed to understand the logic behind required output. So, please open in SQL forum with more and simple logic to get the output. In that forum, I am sure you will get the answer more fast and correct ones.