This content has been marked as final. Show 6 replies
Does every record indicate a change in key ? (from Y to N, or N to Y)
Or can there be records where the key did not change :-
12354 Y JVN 6/18/2007 14:37
12345 Y YVM 5/13/2008 16:28
I t may or may not... But nt necessary that it shud change.
Eg:if it changes from N to Y and frm Y to N.... JVN may/maynot change to YVM
am okay with if we cud create seperate records as follows with seperate querries
1) where N changes to Y or viceversa...
2) change frm JVN to YVM or viceversa...
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.
evn if its is thru plsql cursor it wud be fine for me... cud u pls help me out with its querry???
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.