MASK_PAN()
MASK_PAN() — Masks all but the last four digits of a credit or payment card number.
Synopsis
MASK_PAN( string-expression )
Description
The MASK_PAN() function returns the specified string expression with all but the last four digits replaced by the
character X. Separators included in the string expression are ignored and carried through unchanged into the output. For
example, the output of MASK_PAN('4111-1111-1111-1111') is the string
'XXXX-XXXX-XXXX-1111', where all but the last four digits are masked. To display leading digits as well
or to change the mask character, use the function MASK_CCN().
Documentation