Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
korssane
Posting Yak Master
104 Posts |
Posted - 2009-06-29 : 15:37:43
|
| Hi is any body knows if there is an equivalent for oracle FIRST_VALUE function. Here is my code to translateCASE WHEN (FIRST_VALUE(EV) over (partition by TRID order by re_id DESC) LIKE ''%blabla'') THEN RE_DATE ELSE CASE WHEN (KN_IS_ID IS NOT NULL) THEN KN_IS_BE ELSE FIRST_VALUE(CR_DA) over (partition by TRID order by re_id DESC)ENDthanks |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-06-29 : 15:45:08
|
That would be the use of ROW_NUMBER() windowed function. N 56°04'39.26"E 12°55'05.63" |
 |
|
|
korssane
Posting Yak Master
104 Posts |
Posted - 2009-06-29 : 15:52:49
|
| thanks for the quick reply.is this syntax gonna :return the first value in an ordered set of values? |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
|
|
|