1
Good Afternoon
I would like to know how to concatenate 11 digits in the format of a CPF. Like, format for a CNPJ, I did this:
update ger_ter set cpfcgc = CONCAT(SUBSTRING(cpfcgc, 1,2), '.', SUBSTRING(cpfcgc,3,3), '.', SUBSTRING(cpfcgc,6,3), '/', SUBSTRING(cpfcgc,9,4), '-', SUBSTRING(cpfcgc,13, 2))
where length(cpfcgc) =14 and pessoa=1;
Only I’m not getting 'take' this same idea and leave to format CPF. I’m already tapping pin here. Thanks
what is the difficulty/error? if Cpf has this format "123.456.789-00" only count the position of each group and change the
substring
– Ricardo Pontual
The difficulty was only to change this SQL that I informed to be able to serve for the CPF too. But already the staff already helped me. Thanks to you too.
– Maurício Maciel