Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

REGEXP_REPLACE Credit Card Number with 'X' in obiee report

SteelbirdMar 3 2020 — edited Mar 3 2020

Hi @Team,

I had a requirement where I need to replace the Credit Card number with 4567123789762344 to XXXXXXXXXXXX2344.

I am using this query in Back end data base where I Can accomplish the task but how can we implement it in reporting.

Sql Query:

Select REGEXP_REPLACE(SUBSTR('1234567891234440',1,'1234567891234440'-4), '[0-9]', 'X')||SUBSTR('1234567891234440',-4) FROM DUAL;

Select REGEXP_REPLACE(SUBSTR(CREDIT_CARD_NUM,1,CREDIT_CARD_NUM-4), '[0-9]', 'X')||SUBSTR(CREDIT_CARD_NUM,-4),

CREDIT_CARD_NUM FROM W_SALES_F;

pastedImage_0.png

In Reporting I am using below formula.

EVALUATE('REGEXP_REPLACE(SUBSTR(%1,1,%1-4),''[0-9]'','X') || SUBSTR(%1,-4)',"Sales Details"."CC Number")

It is giving error 'X' invalid Identifier.

Thank you,

Steel.

Comments