Credit Card Masking

J

Justin

Would like to know how to have a column that has credit card #, be masked
but have the last 4 digits appear. I know u can do a password mask but i
need the last 4 digits to appear
 
D

Douglas J Steele

What do you want? ****-****-****-nnnn, where nnnn is the last 4 digits?

"****-****-****-" & Right(CreditCardNumber, 4)
 
J

Justin

yes, but that works only if the card has 16 digits but i know discover card
has 15 digits, will this query work or ....
 
D

Douglas J Steele

Remember, what's in front of the 4 digits is a literal. You could have used
"Justin-Justin" just as easily as "****-****-****-"!
 
W

Workshop

where would you put this?
how would it work?

Douglas J Steele said:
What do you want? ****-****-****-nnnn, where nnnn is the last 4 digits?

"****-****-****-" & Right(CreditCardNumber, 4)
 
D

Douglas J. Steele

That's intended to be placed in a query as a computed field. You could have
that in the query plus the actual credit card number if you need the credit
card number to be joined to other tables.
 
W

Workshop

Thanks, that works great!

Douglas J Steele said:
What do you want? ****-****-****-nnnn, where nnnn is the last 4 digits?

"****-****-****-" & Right(CreditCardNumber, 4)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top