Good morning.
How do I make an SE function in SQL server?
For example, I have data in a column and when it is = '1';'masculino';'feminino'
.
Can you help me out?
Good morning.
How do I make an SE function in SQL server?
For example, I have data in a column and when it is = '1';'masculino';'feminino'
.
Can you help me out?
In this case, you should ideally use CASE , since the return depends on the validation of the data of a specific field:
SELECT CASE WHEN campo_genero = '1' THEN 'Masculino' ELSE 'Feminino' END
FROM nome_tabela