0
I have a table of clients that includes clients PF and PJ. In this table, if the client has CPF has no CNPJ, if CNPJ has no CPF. I need a query that checks which of the two columns is not null and returns only it. Type
SELECT nome, (cnpj or cpf) as documento FROM CLIENTES
where ...
My database is Mysql, but if you have the code in another relational BD I accept, so I can search about.
Thank you Ricardo, that’s right. Thank you
– Rafael Christófano