Page 1 of 1

How to implement this logic

Posted: Tue Jan 25, 2011 2:47 am
by pardu
Hi Guys


i hava some required like this
having following columns

id nubber(pk),event_cd(pk),date(timestamp).dr_ky
123,6210,2010/10/10,null
123,6200,2010/10/11,1010
123,6261,2010/10/11,1212
data like
f 6200 event exists and 6261 event exists and 6261 date >= 6200 date then ignore 6200 event
How to implement this logic

Thanks in advance for your help.

Posted: Tue Jan 25, 2011 3:04 am
by nayanpatra
Is the data coming in any sequence/sort? Is the case deals with comparision between every 2 successive record? What happens to the 6210 event record? Please clarify these doubts to help you.

Posted: Tue Jan 25, 2011 7:41 am
by chulett
What exactly does "ignore 6200 event" translate to? Don't write it to your output? And are we literally hard-coding things for these "event codes" or would it be more proper to mention the first v. the second v. the third? :?

Posted: Tue Jan 25, 2011 2:47 pm
by ray.wurlod
You really do need to specify more exactly and more completely what the mapping rules are here. Do it in English, not in pseudo-code.