Masking CNPJ in firebird

0

I need to mask my CPF / CNPJ field directly in firebird, I tried the command below but it shows error, can anyone help me?

UPDATE EMPRESA
SET EMP_CPF_CNPJ = 
SUBSTRING(EMP_CPF_CNPJ from 1 for 2) + '.'
+ SUBSTRING(EMP_CPF_CNPJ from 3 for 3) + '.'
+ SUBSTRING(EMP_CPF_CNPJ from 6 for 3) + '/'
+ SUBSTRING(EMP_CPF_CNPJ from 9 for 4) + '-'
+ SUBSTRING(EMP_CPF_CNPJ from 13 for 2)
    
asked by anonymous 20.12.2017 / 11:27

0 answers