8i | 9i | 10g | 11g | 12c | Misc | PL/SQL | SQL | RAC | Linux

Home » Misc » Here

Comments for FIRST_VALUE and LAST_VALUE Analytic Functions


msq said...

Shouldn't be IGNORE NULLS inside the first brackets rather..?
I mean
LAST_VALUE(sal IGNORE NULLS)
instead of
LAST_VALUE(sal) IGNORE NULLS

Tim... said...

Hi.

No. Mine is correct. This is the ANSI version. Oracle, supports both, with the same result, but the method you suggest is non-ANSI and deprecated. See:

http://docs.oracle.com/cd/E11882_01/server.112/e41084/functions066.htm#SQLRF00642

Cheers

Tim...

msq said...

I got ora-30484 running your version, but now checked again - it was some ancient dev db running 10g so it makes sense. Thank you.

Don said...

Easy to follow example for last_value(). Thanks.

Randy said...

Very much appreciated, thank you.

DO NOT ask technical questions here! They will be deleted!

These comments should relate to the contents of a specific article. Constructive criticism is good. Advertising and offensive comments are bad and will be deleted!