![]() |
|
Archives of the TeradataForumMessage Posted: Sun, 10 Oct 2004 @ 11:05:35 GMT
Hi All, I have a requirement where my Input/Source is as following
Prty_id Own_cd D1 D2
111 oc1 1 3
111 oc1 4 7
111 oc1 8 10
111 oc2 11 20
111 oc1 21 50
111 oc1 51 60
111 oc2 61 70
111 oc2 71 80
And my output should be as follows :
Prty_id Own_cd D1 D2
111 oc1 1 10
111 oc2 11 20
111 oc1 21 60
111 oc2 61 80
To explain it : If Own_cd changes consecutively then min(D1) and max(D2) should be considered but if it is not then the record should be left as it is. I have tried using windowing functions in TD like Min and Max....but did not had luck. Any help will be greatly appreciated. Sampath Shiva DVR
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||