Cume_dist question

The calculation for CUME_DIST IN CLEANS includes this section
[ NULLS { FIRST | LAST } . Can you explain how to use these?

I am trying to transform MFRPN into Manufacturer & Part in the following example:
image

This is as far as I get.
CUME_DIST(MFRPN) WITHIN GROUP(ORDER BY REQ_ITM_STOCK_CODE [ DESC | ASC ]
[ NULLS { FIRST | LAST } ]
)

image

Thanks, Jim
TDP 6.2.0.23336(32 bit)

NULLS FIRST and NULLS LAST are arguments to the ORDER BY clause, supported by some databases.

The default behaviour of sorting null values varies between different databases.
This allows you to specify whether null values are sorted to the top or the bottom.

1 Like