8i | 9i | 10g | 11g | 12c | 13c | 18c | 19c | 21c | Misc | PL/SQL | SQL | RAC | WebLogic | 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.
Prepared Statement Error: Table './oraclebasecms/cms_page_comment_uuids' is marked as crashed and should be repaired