Hi there,
I need some assistance please in masking some numbers.
Below are samples of the number formats that I am working with.
11111-0-1111111-1111
11111-0-111111-1111
11111-0-11111-1111
Lets call the field costing.costing_number.
Essentially, I need to:
Display the first 5 digits (ie. Everything to the left of the first -)
Display 7 asterisks in the middle
Display the last 4 digits (ie. Everything to the right of the final -)
I would like this masking to apply irrespective of the length of the original field
So…I envisage my masking looking like this (using the same numbers as above):
11111*******1111
HOWEVER, I need to be prepared for exceptions and dirty data.
So, if my data is not in any of the formats above (eg. If the data already reads something like 1111*******111), then I need to simply display the field (costing.costing_number).
Is there anyone that could please assist me with this?
Many thanks in advance!
Cheers,
Corinne
creeno (BOB member since 2011-04-05)